Skip to content

Commit 215272e

Browse files
committed
Skip end instructions
1 parent 137ceac commit 215272e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/fizzy/parser_expr.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,14 @@ parser_result<Code> parse_expr(const uint8_t* pos, const uint8_t* end, FuncIdx f
558558
control_stack.pop(); // Pop the current frame.
559559

560560
if (control_stack.empty())
561+
{
561562
continue_parsing = false;
562-
else if (frame_type.has_value())
563+
break;
564+
}
565+
566+
if (frame_type.has_value())
563567
push_operand(operand_stack, *frame_type);
564-
break;
568+
continue;
565569
}
566570

567571
case Instr::br:

0 commit comments

Comments
 (0)