From 170d2cfe30d6cb4739f3cdeb78396f8b19e66409 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 6 Feb 2024 14:30:58 +0000 Subject: [PATCH] Fix issue comparing characters (copy/paste issue from Java!) which meant that some strings were converted to JSON in a way which parsed wrong --- core/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/utils.js b/core/utils.js index fa3fb14..a75f133 100644 --- a/core/utils.js +++ b/core/utils.js @@ -828,7 +828,7 @@ while (d!==undefined) {console.log(btoa(d));d=f.read(${CHUNKSIZE});} if (ch<8) { // if the next character is a digit, it'd be interpreted // as a 2 digit octal character, so we can't use `\0` to escape it - if (nextCh>='0' && nextCh<='7') js += "\\x0"+ch; + if (nextCh>='0'.charCodeAt() && nextCh<='7'.charCodeAt()) js += "\\x0"+ch; else js += "\\"+ch; } else if (ch==8) js += "\\b"; else if (ch==9) js += "\\t";