diff --git a/lib/pure/uri.nim b/lib/pure/uri.nim index 264ac9f8bf..b85591bdcf 100644 --- a/lib/pure/uri.nim +++ b/lib/pure/uri.nim @@ -284,7 +284,7 @@ proc 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]