aboutsummaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js3
1 files changed, 1 insertions, 2 deletions
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;