From 1cab03b0f0675a86617a7de1749ef3d519a4c334 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 12:50:18 +1000 Subject: Don't wrap lexer/parser strings in a TValue Fixes issue where internal TValues get exposed via lua_Debug structure --- src/ldblib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ldblib.js') diff --git a/src/ldblib.js b/src/ldblib.js index ce0e19d..fbf31e8 100644 --- a/src/ldblib.js +++ b/src/ldblib.js @@ -181,7 +181,7 @@ const db_getlocal = function(L) { let name = lua.lua_getlocal(L1, ar, nvar); if (name) { lua.lua_xmove(L1, L, 1); /* move local value */ - lua.lua_pushstring(L, name.value); /* push name */ + lua.lua_pushstring(L, name); /* push name */ lua.lua_rotate(L, -2, 1); /* re-order */ return 2; } @@ -208,7 +208,7 @@ const db_setlocal = function(L) { let name = lua.lua_setlocal(L1, ar, nvar); if (name === null) lua.lua_pop(L1, 1); /* pop value (if not popped by 'lua_setlocal') */ - lua.lua_pushstring(L, name.value); + lua.lua_pushstring(L, name); return 1; }; -- cgit v1.2.3-54-g00ecf