Fix endianness issues particulary with strings

This commit is contained in:
Quentin Legot
2023-05-07 14:50:41 +02:00
parent 5f8965b94d
commit 5000c28b97
3 changed files with 13 additions and 4 deletions

View File

@ -284,7 +284,7 @@ impl Machine {
*elem = self.main_memory[self.pc as usize + i];
}
let val = u32::from_be_bytes(val) as u64;
let val = u32::from_le_bytes(val) as u64;
let inst : Instruction = Instruction::new(val);
if self.debug {
self.print_status();