From b8432d544c517d6516d24227d9f820a75ca1a525 Mon Sep 17 00:00:00 2001 From: Erin Date: Wed, 15 Nov 2023 18:23:43 +0100 Subject: [PATCH] Baka baka Erin, do not forget to bump the opcode too! --- hbvm/src/vmrun.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbvm/src/vmrun.rs b/hbvm/src/vmrun.rs index 56e7f42..d5bb3bf 100644 --- a/hbvm/src/vmrun.rs +++ b/hbvm/src/vmrun.rs @@ -374,7 +374,10 @@ where /// Bump instruction pointer #[inline(always)] fn bump_pc(&mut self) { - self.pc = self.pc.wrapping_add(core::mem::size_of::()); + self.pc = self + .pc + .wrapping_add(core::mem::size_of::()) + .wrapping_add(1); } /// Decode instruction operands