summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-11 08:53:10 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-11 15:23:04 +0100
commita7b98a2e62c49a6c0ced2b57ddcea9bb6bab108e (patch)
tree1420dfdb17660fd5ca243f25d279dbd308263f7e /src/lstate.js
parent219d7cf24902b53385a1b6999e8bbf2c8512cf0b (diff)
downloadfengari-a7b98a2e62c49a6c0ced2b57ddcea9bb6bab108e.tar.gz
fengari-a7b98a2e62c49a6c0ced2b57ddcea9bb6bab108e.tar.bz2
fengari-a7b98a2e62c49a6c0ced2b57ddcea9bb6bab108e.zip
Fixed bad tailcall, _ENV is a closed upvalue
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js3
1 files changed, 1 insertions, 2 deletions
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 = [];