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/lcode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lcode.js') diff --git a/src/lcode.js b/src/lcode.js index 690d07c..c20c978 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -501,7 +501,8 @@ const addk = function(fs, key, v) { ** Add a string to list of constants and return its index. */ const luaK_stringK = function(fs, s) { - return addk(fs, s, s); /* use string itself as key */ + let o = new TValue(CT.LUA_TLNGSTR, s); + return addk(fs, o, o); /* use string itself as key */ }; -- cgit v1.2.3-54-g00ecf