Fix #2299 by handling very large value cases correctly

This commit is contained in:
gingerBill
2023-01-20 11:23:15 +00:00
parent 8f3b6738ff
commit 8f4ffbe1da
2 changed files with 52 additions and 29 deletions

View File

@@ -2321,7 +2321,7 @@ gb_internal void lb_emit_defer_stmts(lbProcedure *p, lbDeferExitKind kind, lbBlo
if (kind == lbDeferExit_Default) {
if (p->scope_index == d.scope_index &&
d.scope_index > 0) { // TODO(bill): Which is correct: > 0 or > 1?
d.scope_index > 0) {
lb_build_defer_stmt(p, d);
array_pop(&p->defer_stmts);
continue;