micronparser: Fix a parsing bug

This commit is contained in:
Dionysis Grigoropoulos 2025-06-25 23:48:26 +03:00
parent a20b4c9bc3
commit b2f48d5853
No known key found for this signature in database

View file

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