From 54a83a02999cc6a9c23ad977fb1b0e76247cc414 Mon Sep 17 00:00:00 2001 From: David Li Date: Wed, 6 Jan 2016 11:01:22 -0700 Subject: Fix default read_instruction implementation --- src/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/memory.rs b/src/memory.rs index 226b6c2..a0e1a11 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -42,7 +42,7 @@ pub trait MemoryInterface { fn write_word(&mut self, address: isa::Address, value: isa::Word) -> Result<()>; fn read_instruction(&mut self, address: isa::Address) -> Option { - match self.read_word(address / 4) { + match self.read_word(address) { Ok(word) => Some(Instruction::new(word)), Err(_) => None, } -- cgit v1.2.3