From ed0518f417a61b32e531f85c434b8024859202cd Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 24 May 2017 20:44:34 +1000 Subject: Modify stack values up to L.top instead of replacing --- src/lstate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lstate.js') diff --git a/src/lstate.js b/src/lstate.js index b7a11bc..9046adf 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -109,8 +109,8 @@ const stack_init = function(L1, L) { let ci = L1.base_ci; ci.next = ci.previous = null; ci.callstatus = 0; - ci.func = L1.stack[L1.top]; ci.funcOff = L1.top; + ci.func = L1.stack[L1.top]; L1.stack[L1.top++] = new lobject.TValue(CT.LUA_TNIL, null); ci.top = L1.top + defs.LUA_MINSTACK; L1.ci = ci; -- cgit v1.2.3-54-g00ecf