summaryrefslogtreecommitdiff
path: root/extras/gbz80disasm.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-12 13:21:05 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-12 13:21:05 -0600
commit2c24aa3510d833f6d4bec31f8da50aac2d825e72 (patch)
treef6e79e6420dc872ed00f5e875939005663517af4 /extras/gbz80disasm.py
parent2e22ddb2b6ad4841c0620995a1cceedec2b6b86f (diff)
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
Diffstat (limited to 'extras/gbz80disasm.py')
-rw-r--r--extras/gbz80disasm.py2
1 files changed, 1 insertions, 1 deletions
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