about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-16 15:50:47 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-16 15:50:47 +0200
commitc5d70853cd4a2849ecc8697db4d9eb7f9e776c21 (patch)
tree8522e53854630050aea3b59ee66e2e32d230135b
parent191d71795c5a56b0e517fa8b888a06cade77641b (diff)
downloadchawan-c5d70853cd4a2849ecc8697db4d9eb7f9e776c21.tar.gz
url: fix flipped comparison
-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] != '.':