Skip to content

Commit 8b5a760

Browse files
committed
Encapsulated Windows file separator for proper regex parsing
1 parent d364d36 commit 8b5a760

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/memap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def parse_mapfile(self, mapfile):
7979

8080
class _GccParser(_Parser):
8181
RE_OBJECT_FILE = re.compile(r'^(.+\/.+\.o)$')
82-
RE_LIBRARY_OBJECT = re.compile(r'^.+' + sep + r'lib((.+\.a)\((.+\.o)\))$')
82+
RE_LIBRARY_OBJECT = re.compile(r'^.+' + re.escape(sep) + r'lib((.+\.a)\((.+\.o)\))$')
8383
RE_STD_SECTION = re.compile(r'^\s+.*0x(\w{8,16})\s+0x(\w+)\s(.+)$')
8484
RE_FILL_SECTION = re.compile(r'^\s*\*fill\*\s+0x(\w{8,16})\s+0x(\w+).*$')
8585

0 commit comments

Comments
 (0)