From 2c24aa3510d833f6d4bec31f8da50aac2d825e72 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Thu, 12 Jan 2012 13:21:05 -0600 Subject: [PATCH] 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 --- extras/gbz80disasm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/gbz80disasm.py b/extras/gbz80disasm.py index aa90c787..7c2079e0 100644 --- a/extras/gbz80disasm.py +++ b/extras/gbz80disasm.py @@ -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