diff --git a/ic10emu/src/interpreter.rs b/ic10emu/src/interpreter.rs index 910a257..1a8de6f 100644 --- a/ic10emu/src/interpreter.rs +++ b/ic10emu/src/interpreter.rs @@ -444,14 +444,13 @@ impl IC { } oprs => Err(ICError::mismatch_operands(oprs.len(), 1)), }, // TODO - Yield => { - if !operands.is_empty() { - Err(ICError::too_many_operands(operands.len(), 0)) - } else { + Yield => match &operands[..] { + [] => { self.state = ICState::Yield; Ok(()) } - } + oprs => Err(ICError::mismatch_operands(oprs.len(), 0)), + }, Define => match &operands[..] { [name, number] => { let &Operand::Identifier(ident) = &name else {