Skip to content

Commit

Permalink
Update tools/unnamed.py for rgbds 0.6.0 object files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Oct 3, 2022
1 parent f58dbe3 commit c37cc15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/unnamed.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def read_string(file):
elif magic == b'RGB9':
obj_ver = 10 + unpack_from('<I', file)[0]

if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17, 18]:
if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17, 18, 19]:
print(f"Error: File '{objfile}' is of an unknown format.", file=sys.stderr)
sys.exit(1)

num_symbols = unpack_from('<I', file)[0]
unpack_from('<I', file) # skip num sections

if obj_ver in [16, 17, 18]:
if obj_ver in [16, 17, 18, 19]:
node_filenames = []
num_nodes = unpack_from('<I', file)[0]
for x in range(num_nodes):
Expand All @@ -117,7 +117,7 @@ def read_string(file):
sym_type = symtype(unpack_from('<B', file)[0] & 0x7f)
if sym_type == symtype.IMPORT:
continue
if obj_ver in [16, 17, 18]:
if obj_ver in [16, 17, 18, 19]:
sym_fileno = unpack_from('<I', file)[0]
sym_filename = node_filenames[sym_fileno]
else:
Expand Down

0 comments on commit c37cc15

Please sign in to comment.