Skip to content

Commit 137ceac

Browse files
committed
Do not omit end instructions
1 parent c348c56 commit 137ceac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/fizzy/parser_expr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,7 @@ parser_result<Code> parse_expr(const uint8_t* pos, const uint8_t* end, FuncIdx f
534534
// In case it's an outermost implicit function block,
535535
// we want br to jump to the final end of the function.
536536
// Otherwise jump to the next instruction after block's end.
537-
const auto target_pc = control_stack.size() == 1 ?
538-
static_cast<uint32_t>(code.instructions.size()) :
539-
static_cast<uint32_t>(code.instructions.size() + 1);
537+
const auto target_pc = static_cast<uint32_t>(code.instructions.size());
540538

541539
if (frame.instruction == Instr::if_ || frame.instruction == Instr::else_)
542540
{

0 commit comments

Comments
 (0)