From 2a6993bf0e23e2a3759abb9d7127525577dc346c Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Sun, 12 Mar 2017 16:48:53 +0100 Subject: Testing 8-bit strings --- src/lapi.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lapi.js') diff --git a/src/lapi.js b/src/lapi.js index 79cd6fb..96fe207 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -231,7 +231,6 @@ const lua_pushstring = function (L, s) { else { let ts = L.l_G.intern(lua.to_luastring(s)); L.stack[L.top] = ts; - s = ts.value; } L.top++; @@ -537,7 +536,7 @@ const lua_tolstring = function(L, idx) { if (!o.ttisstring() && !o.ttisnumber()) return null; - return o.ttisstring() ? String.fromCharCode(...o.value) : `${o.value}`; + return o.ttisstring() ? o.jsstring() : `${o.value}`; }; const lua_tostring = lua_tolstring; -- cgit v1.2.3-54-g00ecf