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:
parent
61765fa6ba
commit
8eb2371ce1
1 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue