shithub: pokecrystal

Download patch

ref: 341e11cccb33a8ed459cd9a6c41cf1189c6a4550
parent: ba5cd8bbb8b96a080e9a6fe1b1525cd5381fdb24
author: yenatch <[email protected]>
date: Wed Jul 3 17:54:33 EDT 2013

labels: hex is case-insensitive

--- a/extras/labels.py
+++ b/extras/labels.py
@@ -31,8 +31,10 @@
     returnable["bank"] = None
     returnable["offset"] = None
     returnable["address"] = None
-    #only valid characters are 0-9A-F
-    valid = [str(x) for x in range(0,10)] + [chr(x) for x in range(97, 102+1)]
+    #only valid characters are 0-9a-fA-F
+    valid = [str(x) for x in range(10)] + \
+            [chr(x) for x in range(ord('a'), ord('f')+1)] + \
+            [chr(x) for x in range(ord('A'), ord('F')+1)]
     #check if there is a comment in this line
     if ";" not in line:
         return False