diff --git a/src/m68k.rs b/src/m68k.rs index 1617eb2..da2245a 100644 --- a/src/m68k.rs +++ b/src/m68k.rs @@ -626,7 +626,7 @@ impl M68K { Instruction::Rte => { self.sr = self.pop(Size::Word)? as u16; self.pc = self.pop(Size::Long)?; - let format = (self.pop(Size::Long)? & 0xf000) >> 12; + let format = (self.pop(Size::Word)? & 0xf000) >> 12; if format == 8 { let special_status_word = self.pop(Size::Long)?; let fault_address = self.pop(Size::Long)?;