From 50aa5b5029165be03d0cfb34e7d664795dd80898 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 17 Feb 2017 09:27:51 +0100 Subject: More accurate state and closure init --- src/lundump.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lundump.js') 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); -- cgit v1.2.3-54-g00ecf