summaryrefslogtreecommitdiff
path: root/src/lstrlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-24 15:05:59 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-03-24 15:05:59 +0100
commit92089dcbc59b8c71909386c86e36097f98258f2d (patch)
treec028e1199d062b8db772c54d4756f0facd6c8020 /src/lstrlib.js
parent478ffdad62482192fd92a8a8f18275c28cfd6826 (diff)
downloadfengari-92089dcbc59b8c71909386c86e36097f98258f2d.tar.gz
fengari-92089dcbc59b8c71909386c86e36097f98258f2d.tar.bz2
fengari-92089dcbc59b8c71909386c86e36097f98258f2d.zip
Fixed bad quoted cntrl chars
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r--src/lstrlib.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js
index cd95a60..03c6358 100644
--- a/src/lstrlib.js
+++ b/src/lstrlib.js
@@ -204,9 +204,9 @@ const addquoted = function(b, s) {
} else if (iscntrl(s[0])) {
let buff = [];
if (!isdigit(s[1]))
- buff = lua.to_luastring(sprintf("\\%d", s[0]).split('').map(e => e.charCodeAt(0)));
+ buff = lua.to_luastring(sprintf("\\%d", s[0]));
else
- buff = lua.to_luastring(sprintf("\\%03d", s[0]).split('').map(e => e.charCodeAt(0)));
+ buff = lua.to_luastring(sprintf("\\%03d", s[0]));
concat(b, buff);
} else
b.push(s[0]);