From 802c72819c5913133a38a006a8aebd0443905156 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Tue, 10 Feb 2026 14:48:57 -0500 Subject: [PATCH] Fix op_read_char to accept optional timing arguments Lost Pig calls read_char with only the required first operand. The Z-machine spec says time and input_routine are optional. --- src/mudlib/zmachine/zcpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mudlib/zmachine/zcpu.py b/src/mudlib/zmachine/zcpu.py index bff0b83..1d69dfd 100644 --- a/src/mudlib/zmachine/zcpu.py +++ b/src/mudlib/zmachine/zcpu.py @@ -906,7 +906,7 @@ class ZCpu: """Play sound effect (no-op - sound not supported in text MUD).""" pass - def op_read_char(self, unused, time, input_routine): + def op_read_char(self, unused, time=0, input_routine=0): """Read a single character from input stream 0 (keyboard). Optionally, call a routine periodically to decide whether or