stop disassembling when unconditional relative jumps go back

This adds the condition that it should stop disassembling even if there are
unsatisfied labels (example: from before the text script began).

hg-commit-id: 0b6ebcb02348
This commit is contained in:
Bryan Bishop 2012-01-12 13:21:05 -06:00
parent 2e22ddb2b6
commit 2c24aa3510

View file

@ -739,7 +739,7 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000):
#stop reading at a jump, relative jump or return
if current_byte in end_08_scripts_with or (current_byte == 0x18 and target_address < offset):
if not has_outstanding_labels(byte_labels):
if not has_outstanding_labels(byte_labels) or (current_byte == 0x18 and target_address < offset):
keep_reading = False
is_data = False #cleanup
break