diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-17 09:27:51 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-17 09:27:51 +0100 |
commit | 50aa5b5029165be03d0cfb34e7d664795dd80898 (patch) | |
tree | dc42e1a73ac367fef1a88c3dd0502a0879eebea3 /src/lundump.js | |
parent | 4eea48935f2e0ea1267d314f2900af2a1a4b8b02 (diff) | |
download | fengari-50aa5b5029165be03d0cfb34e7d664795dd80898.tar.gz fengari-50aa5b5029165be03d0cfb34e7d664795dd80898.tar.bz2 fengari-50aa5b5029165be03d0cfb34e7d664795dd80898.zip |
More accurate state and closure init
Diffstat (limited to 'src/lundump.js')
-rw-r--r-- | src/lundump.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lundump.js b/src/lundump.js index 0ff3143..ab1dd6f 100644 --- a/src/lundump.js +++ b/src/lundump.js @@ -290,10 +290,14 @@ class BytecodeParser { } - luaU_undump() { + luaU_undump(L) { this.checkHeader(); let cl = new LClosure(this.readByte()); + + L.stack[L.top] = cl; + L.top++; + cl.p = new Proto(); this.readFunction(cl.p); |