Skip to content

Commit

Permalink
update tracing code
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Jun 14, 2024
1 parent c79a2fb commit 32d4268
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl VirtualMachine {
#[cfg(feature = "trace")]
fn print_instruction(&self, instruction: *const Instruction) {
print!("{:?}: ", unsafe {
instruction.offset_from(&self.state.current_frame.program.instructions()[0])
instruction.offset_from(self.state.current_frame.program.instruction(0).unwrap())
});
self.state.registers[1..]
.iter()
Expand Down

0 comments on commit 32d4268

Please sign in to comment.