Skip to content

Commit 6542655

Browse files
committed
1 parent 0121f4a commit 6542655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mdurl/_parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def parse(self, url: str, slashes_denote_host: bool) -> "MutableURL":
202202
if host_end == -1:
203203
host_end = len(rest)
204204

205-
if rest[host_end - 1] == ":":
205+
if host_end > 0 and rest[host_end - 1] == ":":
206206
host_end -= 1
207207
host = rest[:host_end]
208208
rest = rest[host_end:]

0 commit comments

Comments
 (0)