diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-06 11:04:05 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-09 13:28:31 +1000 |
commit | 048234f2ceaad1801473bf8a95219d08797b5e9d (patch) | |
tree | 8947f6e2d5cbc010287c2ff59400804298fd9681 /src/lapi.js | |
parent | 9136aea9f85db964dc368051326a2678d962b8f8 (diff) | |
download | fengari-048234f2ceaad1801473bf8a95219d08797b5e9d.tar.gz fengari-048234f2ceaad1801473bf8a95219d08797b5e9d.tar.bz2 fengari-048234f2ceaad1801473bf8a95219d08797b5e9d.zip |
Initialise CClosure upvalues TValues in constructor
Diffstat (limited to 'src/lapi.js')
-rw-r--r-- | src/lapi.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js index 97cb061..89297cc 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -280,7 +280,8 @@ const lua_pushcclosure = function(L, fn, n) { L.top -= n; while (n--) { - cl.upvalue[n] = L.stack[L.top + n]; + cl.upvalue[n].setfrom(L.stack[L.top + n]) + L.stack[L.top + n] = void 0; } L.stack[L.top] = new TValue(CT.LUA_TCCL, cl); |