diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-05-29 14:50:35 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-05-29 14:50:35 -0500 |
commit | 31d92266f95f3d868cd97e096ab7b7954b954cf1 (patch) | |
tree | 131eacfd845896532c4b8a90ba5a4897929b92cc | |
parent | 895f32e891b86c319c60e1430aa548092bd26cf8 (diff) |
fix up AsmSection and line_has_comment_address
original-commit-id: d174c8b7c6ba0fd9da2b8145e3f8ec5909917e29
-rw-r--r-- | crystal.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -7188,6 +7188,14 @@ class AsmSection: self.parse() def parse(self): line = self.line + + if not "bank" in line: + self.bank_id = -1 + self.address = -1 + self.last_address = None + self.end_address = None + return + bank_id = int(line.split("\"")[1].split("bank")[1], 16) self.bank_id = bank_id start_address = bank_id * 0x4000 @@ -7827,6 +7835,8 @@ def line_has_comment_address(line, returnable={}, bank=None): for c in offset_piece.replace("x", ""): if c not in valid: return False + if len(offset_piece) == 0: + return None offset = int(offset_piece, 16) #filter out blanks/duds elif token in ["$", "0x", "x"]: |