Skip to content

Commit 7a44d85

Browse files
authored
Generate method symbols properly (#7)
* replace namespace `::` separators with `__`
1 parent 0520ff6 commit 7a44d85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

patcher/Patcher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def parse_sect_map(file_path: Path) -> dict[str, str]:
153153

154154
line = f.readline()
155155
while not line.startswith(" *(.data*)"):
156-
items = SPACES_RE.sub(" ", line.strip()).split("(")[0].split(" ")
156+
items = SPACES_RE.sub(" ", line.strip().replace("::", "__")).split("(")[0].split(" ")
157157
if len(items) != 2 or items[1].startswith("?"):
158158
line = f.readline()
159159
continue
@@ -170,7 +170,7 @@ def parse_sect_map(file_path: Path) -> dict[str, str]:
170170

171171
line = f.readline()
172172
while not line.startswith(" *(.bss*)"):
173-
items = SPACES_RE.sub(" ", line.strip()).split(" ")
173+
items = SPACES_RE.sub(" ", line.strip().replace("::", "__")).split(" ")
174174
if len(items) != 2 or items[1].startswith("?"):
175175
line = f.readline()
176176
continue
@@ -187,7 +187,7 @@ def parse_sect_map(file_path: Path) -> dict[str, str]:
187187

188188
line = f.readline()
189189
while not line.startswith(" *(.rdata)"):
190-
items = SPACES_RE.sub(" ", line.strip()).split(" ")
190+
items = SPACES_RE.sub(" ", line.strip().replace("::", "__")).split(" ")
191191
if len(items) != 2 or items[1].startswith("?"):
192192
line = f.readline()
193193
continue

0 commit comments

Comments
 (0)