From 92089dcbc59b8c71909386c86e36097f98258f2d Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 24 Mar 2017 15:05:59 +0100 Subject: Fixed bad quoted cntrl chars --- src/lstrlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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]); -- cgit v1.2.3-70-g09d2