diff --git a/src/mudlib/zmachine/quetzal.py b/src/mudlib/zmachine/quetzal.py index 927e25e..730eb9d 100644 --- a/src/mudlib/zmachine/quetzal.py +++ b/src/mudlib/zmachine/quetzal.py @@ -248,6 +248,12 @@ class QuetzalParser: raise QuetzalStackFrameOverflow self._zmachine._stackmanager = stackmanager + # Update cached references in subsystems that store the stack manager + # (they cache the stack at init time and won't see the replacement) + if hasattr(self._zmachine, "_cpu"): + self._zmachine._cpu._stackmanager = stackmanager + if hasattr(self._zmachine, "_opdecoder"): + self._zmachine._opdecoder._stack = stackmanager log(" Successfully installed all stack frames.") def _parse_intd(self, data):