diff --git a/src/simulator/machine.rs b/src/simulator/machine.rs index 57f4550..d63ea1e 100644 --- a/src/simulator/machine.rs +++ b/src/simulator/machine.rs @@ -44,7 +44,7 @@ impl Machine { /// - **address** in the memory to read pub fn read_memory(machine : &mut Machine, size : i32, address : usize) -> u64 { if size != 1 && size != 2 && size != 4 && size != 8 { - println!("ERROR read_memory : wrong size parameter {}, must be (1, 2, 4 or 8)", size); + panic!("ERROR read_memory : wrong size parameter {}, must be (1, 2, 4 or 8)", size); } let mut ret : u64 = machine.main_memory[address] as u64; @@ -379,5 +379,5 @@ impl Machine { #[cfg(test)] mod test { use super::Machine; - + }