Merge pull request #80 from Erethon/micronparsing-crash

micronparser: Fix a parsing bug
This commit is contained in:
markqvist 2025-07-13 12:19:46 +02:00 committed by GitHub
commit 5b0146325e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,6 +148,9 @@ def parse_line(line, state, url_delegate):
elif first_char == "-":
if len(line) == 2:
divider_char = line[1]
# Control characters don't make sense here and otherwise crash nomadnet
if ord(divider_char) < 32:
divider_char = "\u2500"
else:
divider_char = "\u2500"
if state["depth"] == 0: