ref: 313e853e391e69f9bca875fa37f431c84fb32cbe
parent: b9bd11e34def340afdc7befc29fcca15e3bf71cb
author: yenatch <[email protected]>
date: Tue May 14 09:56:34 EDT 2013
remove redundant code from find_label in gbz80disasm
--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -569,18 +569,7 @@
# 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: