From 96f5f15d820ee18792c3360e884c7751fb2d0637 Mon Sep 17 00:00:00 2001 From: Andrew Keeton Date: Thu, 16 Oct 2014 22:02:18 -0400 Subject: [PATCH] Fix build. --- src/machine.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machine.rs b/src/machine.rs index c22b77f..21574cf 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -91,7 +91,7 @@ impl Machine { }, (instruction::BMI, instruction::UseRelative(rel)) => { - let addr = self.registers.program_counter + rel; + let addr = self.registers.program_counter + AddressDiff(rel as i32); log!(log::DEBUG, "branch if minus relative. address: {}", addr); self.branch_if_minus(addr); }, @@ -207,7 +207,7 @@ impl Machine { } pub fn branch_if_minus(&mut self, addr: Address) { - if (self.registers.status.contains(PS_NEGATIVE)) { + if self.registers.status.contains(PS_NEGATIVE) { self.registers.program_counter = addr; } }