summaryrefslogtreecommitdiff
path: root/src/lundump.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-22 23:26:44 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-23 00:52:05 +1000
commit13328c5bee9b847317313491c3eb9f6f66766de7 (patch)
tree296f23842670f89b07227e0546ed40a42d9ea2f6 /src/lundump.js
parente6639768e4a059aeaf80e232c729dffa3b5e93ba (diff)
downloadfengari-13328c5bee9b847317313491c3eb9f6f66766de7.tar.gz
fengari-13328c5bee9b847317313491c3eb9f6f66766de7.tar.bz2
fengari-13328c5bee9b847317313491c3eb9f6f66766de7.zip
Add luaD_inctop calls where appropriate
Diffstat (limited to 'src/lundump.js')
-rw-r--r--src/lundump.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lundump.js b/src/lundump.js
index 1891451..4931fe8 100644
--- a/src/lundump.js
+++ b/src/lundump.js
@@ -265,7 +265,8 @@ const luaU_undump = function(L, Z, name) {
let S = new BytecodeParser(L, Z, name);
S.checkHeader();
let cl = lfunc.luaF_newLclosure(L, S.readByte());
- L.stack[L.top++] = new lobject.TValue(defs.CT.LUA_TLCL, cl);
+ ldo.luaD_inctop(L);
+ L.stack[L.top-1] = new lobject.TValue(defs.CT.LUA_TLCL, cl);
cl.p = new lfunc.Proto(L);
S.readFunction(cl.p, null);
assert(cl.nupvalues === cl.p.upvalues.length);