mirror of
https://github.com/zeldaret/tmc
synced 2026-06-09 12:46:21 -04:00
Readd void parameters
This commit is contained in:
@@ -187,7 +187,8 @@ def get_script_pointer(barray):
|
||||
integers = struct.unpack('I', barray)
|
||||
val = integers[0]
|
||||
if val >= SCRIPTS_START and val <= SCRIPTS_END:
|
||||
return 'script_' + (struct.pack('>I', val).hex()).upper()
|
||||
return use_script_label(val)
|
||||
# return 'script_' + (struct.pack('>I', val).hex()).upper()
|
||||
else:
|
||||
return '0x'+struct.pack('>I', val).hex()
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def print_rest_bytes(ctx):
|
||||
|
||||
def disassemble_command(ctx: Context, add_all_annotations=False):
|
||||
global used_labels
|
||||
if add_all_annotations or ctx.script_addr + ctx.ptr in used_labels:
|
||||
if (add_all_annotations or ctx.script_addr + ctx.ptr in used_labels) and ctx.ptr != 0:
|
||||
# print offsets to debug when manually inserting labels
|
||||
print(f'{get_script_label(ctx.script_addr + ctx.ptr)}:')
|
||||
cmd = struct.unpack('H', ctx.data[ctx.ptr:ctx.ptr + 2])[0]
|
||||
|
||||
Reference in New Issue
Block a user