summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-24 20:44:34 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-27 22:43:18 +1000
commited0518f417a61b32e531f85c434b8024859202cd (patch)
tree39df7684f14774877a6c454d125e23b28cb5dd18 /src/lstate.js
parent1428582c2d88b23f12c87921381796d03b388d9f (diff)
downloadfengari-ed0518f417a61b32e531f85c434b8024859202cd.tar.gz
fengari-ed0518f417a61b32e531f85c434b8024859202cd.tar.bz2
fengari-ed0518f417a61b32e531f85c434b8024859202cd.zip
Modify stack values up to L.top instead of replacing
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js2
1 files changed, 1 insertions, 1 deletions
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;