fixed another stack error

This commit is contained in:
2020-11-12 16:23:56 -06:00
parent 65662e94f2
commit 93130ede65
2 changed files with 2 additions and 2 deletions

View File

@@ -763,7 +763,7 @@ static void popLocals(CParseState *pstate, int toScope) {
int localsToPop = 0;
while (pstate->compiler->localCount > 0 && pstate->compiler->locals[pstate->compiler->localCount - 1].depth > toScope) {
Local *local = &pstate->compiler->locals[localsToPop];
Local *local = &pstate->compiler->locals[pstate->compiler->localCount - 1];
if (local->isCaptured) { // local needs to be closed over so other closures can reference it
// first though, if there are other locals in queue to pop first, go ahead and pop those :)