summaryrefslogtreecommitdiff
path: root/src/lundump.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lundump.js')
-rw-r--r--src/lundump.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lundump.js b/src/lundump.js
index 5686430..3f61cb6 100644
--- a/src/lundump.js
+++ b/src/lundump.js
@@ -265,8 +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].setclLvalue(cl);
ldo.luaD_inctop(L);
+ L.stack[L.top-1].setclLvalue(cl);
cl.p = new lfunc.Proto(L);
S.readFunction(cl.p, null);
assert(cl.nupvalues === cl.p.upvalues.length);