diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-24 20:44:34 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-27 22:43:18 +1000 |
commit | ed0518f417a61b32e531f85c434b8024859202cd (patch) | |
tree | 39df7684f14774877a6c454d125e23b28cb5dd18 /src/lundump.js | |
parent | 1428582c2d88b23f12c87921381796d03b388d9f (diff) | |
download | fengari-ed0518f417a61b32e531f85c434b8024859202cd.tar.gz fengari-ed0518f417a61b32e531f85c434b8024859202cd.tar.bz2 fengari-ed0518f417a61b32e531f85c434b8024859202cd.zip |
Modify stack values up to L.top instead of replacing
Diffstat (limited to 'src/lundump.js')
-rw-r--r-- | src/lundump.js | 2 |
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); |