diff --git a/src/cpu/mod.rs b/src/cpu/mod.rs index c2340c3..b920b6f 100644 --- a/src/cpu/mod.rs +++ b/src/cpu/mod.rs @@ -171,11 +171,10 @@ impl Mos6502 { let opcode = self.fetch(); if let Some(handler) = &mut self.trace { - let trace = CpuTrace { + handler.handle(&CpuTrace { opcode, address: self.registers.pc.address() - 1, - }; - handler.handle(&trace); + }); } match self.execute(opcode) {