aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-01-01 11:59:09 +0000
committergingerBill <bill@gingerbill.org>2019-01-01 11:59:09 +0000
commitf647187e5332408ad3038f65e63693e019b70ccb (patch)
tree8907f18ebcffe7f0afe84bf88fffd203694d8db1 /src/ir.cpp
parent9dabbc2c95b6b413037a8a8b4bc1c7a7b0f053e4 (diff)
Fix defer on branching with new scoping rules
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 77a515245..a8b2e77c3 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -2967,7 +2967,7 @@ void ir_emit_defer_stmts(irProcedure *proc, irDeferExitKind kind, irBlock *block
ir_build_defer_stmt(proc, d);
} else if (kind == irDeferExit_Branch) {
GB_ASSERT(block != nullptr);
- isize lower_limit = block->scope_index+1;
+ isize lower_limit = block->scope_index;
if (lower_limit < d.scope_index) {
ir_build_defer_stmt(proc, d);
}