From d76047e48b7d35bc36112f98819a1d3326c4092c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rativel?= Date: Wed, 15 Feb 2023 14:22:31 +0100 Subject: [PATCH] changed Mem_Checker method --- src/simulator/mem_cmp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulator/mem_cmp.rs b/src/simulator/mem_cmp.rs index 723eef7..abddae9 100644 --- a/src/simulator/mem_cmp.rs +++ b/src/simulator/mem_cmp.rs @@ -107,11 +107,11 @@ impl Mem_Checker{ let current_line = line.unwrap(); - if i == 0 { + if i == current_line.len()-2 { //Lecture de PC pc = string_hex_to_usize(¤t_line); } - else if i == 1 { + else if i == current_line.len()-1 { //Lecture SP sp = string_hex_to_usize(¤t_line); }