Skip to content

Commit 666787b

Browse files
committed
Adjust exit point in loop_pop(); fix #3541
1 parent d35fcf1 commit 666787b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mrbgems/mruby-compiler/core/codegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2956,10 +2956,10 @@ loop_break(codegen_scope *s, node *tree)
29562956
static void
29572957
loop_pop(codegen_scope *s, int val)
29582958
{
2959+
dispatch_linked(s, s->loop->pc3);
29592960
if (val) {
29602961
genop(s, MKOP_A(OP_LOADNIL, cursp()));
29612962
}
2962-
dispatch_linked(s, s->loop->pc3);
29632963
s->loop = s->loop->prev;
29642964
if (val) push();
29652965
}

0 commit comments

Comments
 (0)