We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d9ed3b commit 8234108Copy full SHA for 8234108
1 file changed
lib/fizzy/execute.cpp
@@ -593,7 +593,7 @@ ExecutionResult execute(
593
case Instr::end:
594
{
595
// End execution if it's a final end instruction.
596
- if (pc == &code.instructions[code.instructions.size()])
+ if (pc == code.instructions.data() + code.instructions.size())
597
goto end;
598
break;
599
}
@@ -1563,7 +1563,8 @@ ExecutionResult execute(
1563
1564
1565
end:
1566
- assert(pc == &code.instructions[code.instructions.size()]); // End of code must be reached.
+ // End of code must be reached.
1567
+ assert(pc == code.instructions.data() + code.instructions.size());
1568
assert(stack.size() == instance.module->get_function_type(func_idx).outputs.size());
1569
1570
return stack.size() != 0 ? ExecutionResult{stack.top()} : Void;
0 commit comments