From 0f5fada29eea23a457e52769e72b8e03bad51038 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Mon, 9 Feb 2026 21:46:59 -0500 Subject: [PATCH] Remove duplicate routine_address == 0 check from op_call The _call() method already handles this case, so the check in op_call is redundant. --- src/mudlib/zmachine/zcpu.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/mudlib/zmachine/zcpu.py b/src/mudlib/zmachine/zcpu.py index 3cc67fb..596c1d0 100644 --- a/src/mudlib/zmachine/zcpu.py +++ b/src/mudlib/zmachine/zcpu.py @@ -605,17 +605,7 @@ class ZCpu: # call in v1-3 def op_call(self, routine_addr, *args): """Call the routine r1, passing it any of r2, r3, r4 if defined.""" - # Calling address 0 is a no-op that returns false (0). - if routine_addr == 0: - self._write_result(0) - return - addr = self._memory.packed_address(routine_addr) - return_addr = self._opdecoder.get_store_address() - current_addr = self._opdecoder.program_counter - new_addr = self._stackmanager.start_routine( - addr, return_addr, current_addr, args - ) - self._opdecoder.program_counter = new_addr + self._call(routine_addr, args, True) def op_call_vs(self, routine_addr, *args): """See op_call."""