summaryrefslogtreecommitdiff
path: root/labels.py
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2013-07-03 21:54:33 -0400
committeryenatch <yenatch@gmail.com>2013-07-10 19:12:48 -0400
commit101c57b58d46048f1b76ce7522df63ead6d3289b (patch)
tree650098b1ef820a260d9ed21c3b8c31795300758a /labels.py
parent936c80e75e79222fa90c963d4c6daf5751d541c3 (diff)
labels: hex is case-insensitive
original-commit-id: 341e11cccb33a8ed459cd9a6c41cf1189c6a4550
Diffstat (limited to 'labels.py')
-rw-r--r--labels.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/labels.py b/labels.py
index 61ec4c2..8b4df16 100644
--- a/labels.py
+++ b/labels.py
@@ -31,8 +31,10 @@ def line_has_comment_address(line, returnable={}, bank=None):
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