summaryrefslogtreecommitdiff
path: root/src/lundump.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-17 09:27:51 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-17 09:27:51 +0100
commit50aa5b5029165be03d0cfb34e7d664795dd80898 (patch)
treedc42e1a73ac367fef1a88c3dd0502a0879eebea3 /src/lundump.js
parent4eea48935f2e0ea1267d314f2900af2a1a4b8b02 (diff)
downloadfengari-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.js6
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);