summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbz80disasm.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gbz80disasm.py b/gbz80disasm.py
index b27ce17..2e21f8d 100644
--- a/gbz80disasm.py
+++ b/gbz80disasm.py
@@ -557,6 +557,11 @@ call_commands = [0xdc, 0xd4, 0xc4, 0xcc, 0xcd]
all_labels = {}
def load_labels(filename="labels.json"):
global all_labels
+
+ # don't re-load labels each time
+ if all_labels != {}:
+ return
+
if os.path.exists(filename):
all_labels = json.read(open(filename, "r").read())
else: