Index: scripts/astDecompile.js |
=================================================================== |
--- a/scripts/astDecompile.js |
+++ b/scripts/astDecompile.js |
@@ -382,17 +382,17 @@ function sanitize(str, q) { |
if (x == '\\') return '\\\\'; |
if (x == '\b') return '\\b'; |
if (x == '\f') return '\\f'; |
if (x == '\n') return '\\n'; |
if (x == '\r') return '\\r'; |
if (x == '\t') return '\\t'; |
if (x == '\v') return '\\v'; |
let val = x.charCodeAt(0); |
- if (x < ' ') return '\\x' + (val - val % 16) / 16 + (val % 16); |
+ if (x < ' ') return '\\x' + ((val - val % 16) / 16).toString(16) + (val % 16).toString(16); |
return x; |
} |
let result = ""; |
for (let char of str) |
result += replace(char); |
return result; |
} |