Skip to content

Commit

Permalink
Fix issue comparing characters (copy/paste issue from Java!) which me…
Browse files Browse the repository at this point in the history
…ant that some strings were converted to JSON in a way which parsed wrong
  • Loading branch information
gfwilliams committed Feb 6, 2024
1 parent a194364 commit 170d2cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 170d2cf

Please sign in to comment.