diff options
| author | gingerBill <bill@gingerbill.org> | 2018-01-21 19:26:55 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-01-21 19:26:55 +0000 |
| commit | 2c0b08145f3295586595be04e2495dabfc2580d2 (patch) | |
| tree | 7b421675c5fa90ced5e56f7b2dce766aab9ecc09 /src | |
| parent | aa9c9eda9e2ca1e20356927f0a014cbf1e559205 (diff) | |
Fix nested `defer` blocks
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 1d04ddec3..1f1bcf949 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -1691,7 +1691,7 @@ void ir_emit_defer_stmts(irProcedure *proc, irDeferExitKind kind, irBlock *block irDefer d = proc->defer_stmts[i]; if (kind == irDeferExit_Default) { if (proc->scope_index == d.scope_index && - d.scope_index > 1) { + d.scope_index > 0) { // TODO(bill): Which is correct: > 0 or > 1? ir_build_defer_stmt(proc, d); array_pop(&proc->defer_stmts); continue; |