Skip to content

Commit

Permalink
fix set_program_counter
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Sep 24, 2024
1 parent 072c791 commit 83da8c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/vm2/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ impl<T: Tracer, W> CallframeInterface for CallframeWrapper<'_, T, W> {
}

fn set_program_counter(&mut self, value: u16) {
self.frame.set_pc_from_u16(value);
if let Some(call) = self.near_call_on_top_mut() {
call.previous_frame_pc = value;
} else {
self.frame.set_pc_from_u16(value);
}
}

fn exception_handler(&self) -> u16 {
Expand Down

0 comments on commit 83da8c5

Please sign in to comment.