erpt: types are now a byte in 22.0.0

This commit is contained in:
hexkyz
2026-03-18 21:18:05 +00:00
parent 61ac03e22d
commit 00f987dd38

View File

@@ -344,7 +344,7 @@ def get_full(nxo):
full = put_qword(full, offset, addend + LOAD_BASE)
else:
print('TODO r_type %d' % (r_type,))
with open('E:\\full.bin', 'wb') as f:
with open('full.bin', 'wb') as f:
f.write(full)
return full
@@ -414,6 +414,10 @@ def find_categories(full, num_fields):
def find_types(full, num_fields):
KNOWN = range(10) + [4, 4, 2, 4]
KNOWN_OLD = range(10) + [4, 4, 0, 4]
try:
ind = full.index(''.join(pk('<B', i) for i in KNOWN))
return list(up('<'+'B'*num_fields, full[ind:ind+num_fields]))
except ValueError:
try:
ind = full.index(''.join(pk('<I', i) for i in KNOWN))
except ValueError: