aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2016-01-06 11:01:22 -0700
committerDavid Li <li.davidm96@gmail.com>2016-01-06 11:01:22 -0700
commit54a83a02999cc6a9c23ad977fb1b0e76247cc414 (patch)
tree0db70bcd0ed518c91240ad773f2f505f79eb4ca7 /src
parent7a658e13b8909b7f98cc7fe39bb4797248674cb4 (diff)
Fix default read_instruction implementation
Diffstat (limited to 'src')
-rw-r--r--src/memory.rs2
1 files changed, 1 insertions, 1 deletions
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<Instruction> {
- match self.read_word(address / 4) {
+ match self.read_word(address) {
Ok(word) => Some(Instruction::new(word)),
Err(_) => None,
}