fix(interpreter): wrong le byte order on pop

This commit is contained in:
2025-06-17 10:54:42 +09:00
parent 1f5e175c68
commit 7e7e648fa8
3 changed files with 17 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ impl Memory {
.get((idx + 1) as usize)
.ok_or(InterpreterError::MemoryOutOfBound(idx))?
.to_owned();
Ok(Word::from_be_bytes([b1, b2]))
Ok(Word::from_be_bytes([b2, b1]))
}
/// Write an [`ImmediateOperand`] to a memory location indexed by a [`MemoryIndex`].