Add stack and local_vars to ZStackBottom sentinel

ZStackBottom lacked attributes that normal stack operations need when
returning from a subroutine to the top level. Zork 1 hit this on the
first subroutine return during startup.
This commit is contained in:
Jared Miller 2026-02-09 21:05:27 -05:00
parent 61765fa6ba
commit 8eb2371ce1
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -96,6 +96,8 @@ class ZRoutine:
class ZStackBottom: class ZStackBottom:
def __init__(self): def __init__(self):
self.program_counter = 0 # used as a cache only self.program_counter = 0 # used as a cache only
self.stack = []
self.local_vars = [0 for _ in range(15)]
class ZStackManager: class ZStackManager: