From d2be017d14da9db35d51305b7465c33d78c25689 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 5 Jun 2018 09:16:55 -0400 Subject: Fix bug in map2link.py --- tools/map2link.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/map2link.py') diff --git a/tools/map2link.py b/tools/map2link.py index 109dfa1..53f0836 100644 --- a/tools/map2link.py +++ b/tools/map2link.py @@ -75,10 +75,12 @@ class MapFile: def __init__(self, linestr): super().__init__(linestr) match = re.search(r'\$([0-9A-F]{4}) \(\$([0-9A-F]+) bytes\) \["(.+)"\]', linestr, re.I) - start, size, self.name = match.groups() - self.start = int(start, 16) + end, size, self.name = match.groups() + self.end = int(end, 16) self.size = int(size, 16) - self.end = self.start + self.size + if self.size > 0: + self.end += 1 + self.start = self.end - self.size self.symbols = [] class SymbolLine(MapFileLine): -- cgit v1.2.3