about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/types/url.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types/url.nim b/src/types/url.nim
index 3828ea70..db0946e3 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -234,7 +234,7 @@ func endsInNumber(input: string): bool =
   if i < 0:
     return false
   inc i
-  if i + 1 >= input.len and input[i] == '0' and input[i + 1] in {'x', 'X'}:
+  if i + 1 < input.len and input[i] == '0' and input[i + 1] in {'x', 'X'}:
     # hex?
     i += 2
     while i < input.len and input[i] != '.':