From 018f9cd8bbff126b7381bafa135e8127033c2faa Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 24 May 2017 14:14:58 +1000 Subject: Keep api_incr_top macro contents distinct - Don't have postincrement in a previous expression - Fix a couple of places the assert was missing --- src/ldebug.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ldebug.js') diff --git a/src/ldebug.js b/src/ldebug.js index e78d3e7..2a9ada6 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -183,12 +183,14 @@ const funcinfo = function(ar, cl) { const collectvalidlines = function(L, f) { if (f === null || f instanceof lobject.CClosure) { - L.stack[L.top++] = new lobject.TValue(CT.LUA_TNIL, null); + L.stack[L.top] = new lobject.TValue(CT.LUA_TNIL, null); + L.top++; assert(L.top <= L.ci.top, "stack overflow"); } else { let lineinfo = f.l.p.lineinfo; let t = ltable.luaH_new(L); - L.stack[L.top++] = new lobject.TValue(CT.LUA_TTABLE, t); + L.stack[L.top] = new lobject.TValue(CT.LUA_TTABLE, t); + L.top++; assert(L.top <= L.ci.top, "stack overflow"); let v = new lobject.TValue(CT.LUA_TBOOLEAN, true); for (let i = 0; i < f.l.p.length; i++) -- cgit v1.2.3-54-g00ecf