diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-24 14:14:58 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-27 22:14:45 +1000 |
commit | 018f9cd8bbff126b7381bafa135e8127033c2faa (patch) | |
tree | fbbaee1d4fd0b9a0184a7eef4a2768b320cd3f54 /src/lstate.js | |
parent | 4034ef458697729d1a8a25058b43272ae5882ce2 (diff) | |
download | fengari-018f9cd8bbff126b7381bafa135e8127033c2faa.tar.gz fengari-018f9cd8bbff126b7381bafa135e8127033c2faa.tar.bz2 fengari-018f9cd8bbff126b7381bafa135e8127033c2faa.zip |
Keep api_incr_top macro contents distinct
- Don't have postincrement in a previous expression
- Fix a couple of places the assert was missing
Diffstat (limited to 'src/lstate.js')
-rw-r--r-- | src/lstate.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lstate.js b/src/lstate.js index 2413574..b7a11bc 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -147,7 +147,8 @@ const f_luaopen = function(L) { const lua_newthread = function(L) { let g = L.l_G; let L1 = new lua_State(g); - L.stack[L.top++] = new lobject.TValue(CT.LUA_TTHREAD, L1); + L.stack[L.top] = new lobject.TValue(CT.LUA_TTHREAD, L1); + L.top++; assert(L.top <= L.ci.top, "stack overflow"); L1.hookmask = L.hookmask; L1.basehookcount = L.basehookcount; |