diff --git a/lib/pure/uri.nim b/lib/pure/uri.nim index e2b44a0185..4b25ba084c 100644 --- a/lib/pure/uri.nim +++ b/lib/pure/uri.nim @@ -355,7 +355,7 @@ func removeDotSegments(path: string): string = discard collection.pop() i.inc 3 continue - elif path[i+1] == '/': + elif i + 1 < path.len and path[i+1] == '/': i.inc 2 continue currentSegment.add path[i]