From 5ccc508c40a49923de659dc911302fa7e653c656 Mon Sep 17 00:00:00 2001 From: maforget <11904426+maforget@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:25:23 -0400 Subject: [PATCH] Fix exception with Maximum Memory not working with high values. --- ComicRack/MainForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComicRack/MainForm.cs b/ComicRack/MainForm.cs index e261e4e..e9ed42f 100644 --- a/ComicRack/MainForm.cs +++ b/ComicRack/MainForm.cs @@ -3704,7 +3704,7 @@ private void trimTimer_Tick(object sender, EventArgs e) { using (Process process = Process.GetCurrentProcess()) { - process.MaxWorkingSet = new IntPtr(val.Clamp(50, Settings.UnlimitedSystemMemory) * 1024 * 1024); + process.MaxWorkingSet = new IntPtr(Convert.ToInt64(val.Clamp(50, Settings.UnlimitedSystemMemory)) * 1024 * 1024); } } catch