From 9da9c41fd17ddea1e32f3ee888565841b5a682ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=96=91=ED=95=B4=ED=9B=88?= Date: Thu, 30 Apr 2026 00:15:52 +0000 Subject: [PATCH] Fix save/load encoding mismatch causing consoleLines to grow indefinitely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The save() function encodes with btoa(unescape(encodeURIComponent(...))), but load() was decoding with only JSON.parse(atob(...)), missing the reverse decodeURIComponent(escape(...)) step. This caused non-ASCII characters (like the × in the giftcode hunter multiplier message) to corrupt and double in size on every page load, producing garbled ÃÂÃÂ... strings that grew indefinitely. The fix adds decodeURIComponent(escape(...)) to match the save encoding, consistent with how loadOptions() already correctly handles this. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- js/utils/save.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/utils/save.js b/js/utils/save.js index b9d04e3..1cb7219 100644 --- a/js/utils/save.js +++ b/js/utils/save.js @@ -195,7 +195,7 @@ function load() { options = getStartOptions(); } else { - player = Object.assign(getStartPlayer(), JSON.parse(atob(get))); + player = Object.assign(getStartPlayer(), JSON.parse(decodeURIComponent(escape(atob(get))))); fixSave(); loadOptions(); }