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 fac7d37..814498c 100644
--- a/src/lcode.js
+++ b/src/lcode.js
@@ -7,6 +7,7 @@ const llex = require('./llex.js');
const lobject = require('./lobject.js');
const lopcode = require('./lopcodes.js');
const lparser = require('./lparser.js');
+const lstring = require('./lstring.js');
const ltable = require('./ltable.js');
require('./lstate.js'); /* XXX: if this isn't here then things break on require("ltm") */
const ltm = require('./ltm.js');
@@ -514,7 +515,7 @@ const luaK_stringK = function(fs, s) {
*/
const luaK_intK = function(fs, n) {
/* FIXME: shouldn't use string as key. need to use pointer */
- let k = new TValue(CT.LUA_TLNGSTR, defs.to_luastring(`${n}`));
+ let k = new TValue(CT.LUA_TLNGSTR, lstring.luaS_bless(fs.L, defs.to_luastring(`${n}`)));
let o = new TValue(CT.LUA_TNUMINT, n);
return addk(fs, k, o);
};