From a7b98a2e62c49a6c0ced2b57ddcea9bb6bab108e Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Sat, 11 Feb 2017 08:53:10 +0100 Subject: Fixed bad tailcall, _ENV is a closed upvalue --- src/lstate.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lstate.js') diff --git a/src/lstate.js b/src/lstate.js index 2c322c3..fcc3eb6 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -28,13 +28,12 @@ class CallInfo { class lua_State { constructor(cl) { - this.top = 2; + this.top = 1; this.ci = new CallInfo(0, cl, 1, 1, null, null); this.ci.u.l.savedpc = cl.p.code; this.ci.nresults = LUA_MULTRET; this.ciOff = 0; this.stack = [ - new Table(), // _ENV cl ]; this.openupval = []; -- cgit v1.2.3-54-g00ecf