chore(interpreter): fix small bugs

This commit is contained in:
2025-06-17 22:35:42 +09:00
parent 53262f9e3e
commit 6678a1ef4a
4 changed files with 13 additions and 6 deletions

View File

@@ -151,7 +151,7 @@ impl From<usize> for ImmediateOperand {
impl Into<Word> for ImmediateOperand {
fn into(self) -> u16 {
match self {
ImmediateOperand::Byte(_) => self.sign_extend().into(),
ImmediateOperand::Byte(b) => b as Word,
ImmediateOperand::Word(w) => w,
}
}