about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-16 18:30:03 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-16 18:30:03 +0100
commita3b2d9189f3b25c7cf79985beac843cc46c37cfc (patch)
tree7b371adff64309f98edcf8115eba6461a9c3bce0 /src/types
parent3f2bc1069142ae13f9991102a0c01cd1291b08e8 (diff)
downloadchawan-a3b2d9189f3b25c7cf79985beac843cc46c37cfc.tar.gz
strwidth & url fixes
* actually search Combining for isCombining
* fix searchInMap
* fix cmpRange of url
Diffstat (limited to 'src/types')
-rw-r--r--src/types/url.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/types/url.nim b/src/types/url.nim
index 0f65e727..ee3f168e 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -250,10 +250,10 @@ type u32pair {.packed.} = object
   b: uint32
 
 func cmpRange(x: u32pair, y: uint32): int =
-  if x.a < y:
-    return -1
-  elif x.b > y:
+  if x.a > y:
     return 1
+  elif x.b < y:
+    return -1
   return 0
 
 func processIdna(str: string, checkhyphens, checkbidi, checkjoiners,