diff --git a/src/processor.rs b/src/processor.rs index 1404443..25cdb31 100644 --- a/src/processor.rs +++ b/src/processor.rs @@ -1213,7 +1213,7 @@ impl CPU { fn next_opcode(&mut self) -> u8 { unsafe { let opcode = self.memory.get(self.state.pc.as_u16); - self.state.pc.as_u16 += 0x1; + self.state.pc.as_u16 = self.state.pc.as_u16.wrapping_add(0x1); return opcode; }; }