summaryrefslogtreecommitdiff
path: root/src/ldblib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-05 12:50:18 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-05 13:32:04 +1000
commit1cab03b0f0675a86617a7de1749ef3d519a4c334 (patch)
treed490c3a10fd18d793467497da954d74998781158 /src/ldblib.js
parent0299958592ed34cbd6e8cf01891fc5bbaee71750 (diff)
downloadfengari-1cab03b0f0675a86617a7de1749ef3d519a4c334.tar.gz
fengari-1cab03b0f0675a86617a7de1749ef3d519a4c334.tar.bz2
fengari-1cab03b0f0675a86617a7de1749ef3d519a4c334.zip
Don't wrap lexer/parser strings in a TValue
Fixes issue where internal TValues get exposed via lua_Debug structure
Diffstat (limited to 'src/ldblib.js')
-rw-r--r--src/ldblib.js4
1 files changed, 2 insertions, 2 deletions
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;
};