From 313e853e391e69f9bca875fa37f431c84fb32cbe Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 14 May 2013 13:56:34 -0400 Subject: [PATCH] remove redundant code from find_label in gbz80disasm --- extras/gbz80disasm.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/extras/gbz80disasm.py b/extras/gbz80disasm.py index b476654b7..32edf0096 100644 --- a/extras/gbz80disasm.py +++ b/extras/gbz80disasm.py @@ -569,18 +569,7 @@ def find_label(local_address, bank_id=0): # keep an integer if type(local_address) == str: - local_address1 = int(local_address.replace("$", "0x"), 16) - else: local_address1 = local_address - - # turn local_address into an integer - if type(local_address) == str: - if "0x" in local_address: - local_address = local_address.replace("0x", "$") - elif "$" in local_address: - local_address = local_address.replace("$", "") - - if type(local_address) == str: - local_address = int(local_address, 16) + local_address = int(local_address.replace("$", "0x"), 16) for label_entry in all_labels: if label_entry["address"] == local_address: