diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-05 12:50:18 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-05 13:32:04 +1000 |
commit | 1cab03b0f0675a86617a7de1749ef3d519a4c334 (patch) | |
tree | d490c3a10fd18d793467497da954d74998781158 /src/lcode.js | |
parent | 0299958592ed34cbd6e8cf01891fc5bbaee71750 (diff) | |
download | fengari-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/lcode.js')
-rw-r--r-- | src/lcode.js | 3 |
1 files changed, 2 insertions, 1 deletions
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 */ }; |