From c4935caccee4f5691fc200e7c92fbe5afd765816 Mon Sep 17 00:00:00 2001 From: GeekCorner <45696571+GeekCornerGH@users.noreply.github.com> Date: Sun, 13 Feb 2022 10:47:02 +0100 Subject: [PATCH] fix (Java settings): Ram innacurate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch fix the bug that allow you to add more ram than your computeršŸ’„ (see below) https://cdn.discordapp.com/attachments/745952899820945469/922076880046272522/SPOILER_unknown.png --- app/assets/js/configmanager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index f7181c2096..1117cc7876 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -88,7 +88,7 @@ exports.getAbsoluteMinRAM = function(){ exports.getAbsoluteMaxRAM = function(){ const mem = os.totalmem() - return Math.floor((mem/1000000000)) + return Math.floor((mem - 1000000000) / 1000000000) } function resolveMaxRAM(){ @@ -847,4 +847,4 @@ exports.updateMicrosoftAuth = (accessToken, expiresAt) => { config.microsoftAuth.expires_at = expiresAt return config.microsoftAuth -} \ No newline at end of file +}