retro-extend.py: fix dictionary lookups

FossilOrigin-Name: a58bc1a4860fcf38c1931dbe3614ee9a88441279906d400d9c795c8093f8fbbb
This commit is contained in:
crc 2024-10-30 13:32:02 +00:00
parent 9f5a851279
commit c3f2218681
2 changed files with 3 additions and 2 deletions

View file

@ -16,6 +16,7 @@
- retro-describe(1) now uses embedded glossary data - retro-describe(1) now uses embedded glossary data
- retro-muri.py: increase memory size for initial image - retro-muri.py: increase memory size for initial image
- retro-extend.py: fix dictionary lookups
- documentation - documentation

View file

@ -353,7 +353,7 @@ class Retro:
Dictionary = dict() Dictionary = dict()
header = self.memory[2] header = self.memory[2]
while header != 0: while header != 0:
named = self.extract_string(header + 4) named = self.extract_string(header + 9)
if not named in Dictionary: if not named in Dictionary:
Dictionary[named] = header Dictionary[named] = header
header = self.memory[header] header = self.memory[header]
@ -366,7 +366,7 @@ class Retro:
header = self.memory[2] header = self.memory[2]
Done = False Done = False
while header != 0 and not Done: while header != 0 and not Done:
if named == self.extract_string(header + 4): if named == self.extract_string(header + 9):
self.Dictionary[named] = header self.Dictionary[named] = header
Done = True Done = True
else: else: