summaryrefslogtreecommitdiff
path: root/src/lcode.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lcode.js')
-rw-r--r--src/lcode.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lcode.js b/src/lcode.js
index c0ca1ff..8b4a57c 100644
--- a/src/lcode.js
+++ b/src/lcode.js
@@ -183,7 +183,7 @@ const fixjump = function(fs, pc, dest) {
let offset = dest - (pc + 1);
assert(dest !== NO_JUMP);
if (Math.abs(offset) > lopcode.MAXARG_sBx)
- llex.luaX_syntaxerror(fs.ls, "control structure too long");
+ llex.luaX_syntaxerror(fs.ls, lua.to_luastring("control structure too long"));
lopcode.SETARG_sBx(jmp, offset);
};
@@ -425,7 +425,7 @@ const luaK_checkstack = function(fs, n) {
let newstack = fs.freereg + n;
if (newstack > fs.f.maxstacksize) {
if (newstack >= MAXREGS)
- llex.luaX_syntaxerror(fs.ls, "function or expression needs to many registers");
+ llex.luaX_syntaxerror(fs.ls, lua.to_luastring("function or expression needs to many registers"));
fs.f.maxstacksize = newstack;
}
};
@@ -1277,4 +1277,4 @@ module.exports.luaK_setmultret = luaK_setmultret;
module.exports.luaK_setoneret = luaK_setoneret;
module.exports.luaK_setreturns = luaK_setreturns;
module.exports.luaK_storevar = luaK_storevar;
-module.exports.luaK_stringK = luaK_stringK; \ No newline at end of file
+module.exports.luaK_stringK = luaK_stringK;