diff options
Diffstat (limited to 'src/lundump.js')
-rw-r--r-- | src/lundump.js | 3 |
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); |