summaryrefslogtreecommitdiff
path: root/src/lcode.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lcode.js')
-rw-r--r--src/lcode.js3
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 */
};