From 84d8bcc84f27cfb5f182bc06520c9ab41cf18280 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Wed, 15 Mar 2023 14:04:25 +0100 Subject: [PATCH] div 8 --- src/simulator/machine.rs | 2 +- src/simulator/mem_cmp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulator/machine.rs b/src/simulator/machine.rs index e3ecffc..1425292 100644 --- a/src/simulator/machine.rs +++ b/src/simulator/machine.rs @@ -757,7 +757,7 @@ mod test { } #[test] - #[ignore] + //#[ignore] fn test_comp() { let mut m = Machine::init_machine(); let memory_before = mem_cmp::MemChecker::from("test/machine/memoryComp.txt").unwrap(); diff --git a/src/simulator/mem_cmp.rs b/src/simulator/mem_cmp.rs index 496712b..04aed6d 100644 --- a/src/simulator/mem_cmp.rs +++ b/src/simulator/mem_cmp.rs @@ -170,7 +170,7 @@ impl MemChecker{ for section in m_c.sections.iter() { for (i,b) in section.content.iter().enumerate() { - machine.main_memory[section.addr + i] = *b; + machine.main_memory[section.addr/8 + i] = *b; } } }