diff options
author | daurnimator <quae@daurnimator.com> | 2017-04-27 17:20:28 +1000 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-28 14:15:58 +0200 |
commit | 18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd (patch) | |
tree | 57a32acf8fc5f7149c94a8e979ed39b9dba7e912 /src/lparser.js | |
parent | 4cd7e4062219ccffbbc9e397e1ab599c26a3ae76 (diff) | |
download | fengari-18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd.tar.gz fengari-18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd.tar.bz2 fengari-18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd.zip |
LClosure and CClosure shouldn't subclass TValue
Diffstat (limited to 'src/lparser.js')
-rw-r--r-- | src/lparser.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lparser.js b/src/lparser.js index 86b286a..b8cfeed 100644 --- a/src/lparser.js +++ b/src/lparser.js @@ -1546,7 +1546,7 @@ const luaY_parser = function(L, z, buff, dyd, name, firstchar) { let lexstate = new llex.LexState(); let funcstate = new FuncState(); let cl = lfunc.luaF_newLclosure(L, 1); /* create main closure */ - L.stack[L.top++] = cl; + L.stack[L.top++] = new TValue(defs.CT.LUA_TLCL, cl); lexstate.h = new TValue(defs.CT.LUA_TTABLE, ltable.luaH_new(L)); /* create table for scanner */ L.stack[L.top++] = lexstate.h; funcstate.f = cl.p = new Proto(L); |