about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/data/idna.nim9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/data/idna.nim b/src/data/idna.nim
index 026d7942..e2c79b41 100644
--- a/src/data/idna.nim
+++ b/src/data/idna.nim
@@ -37,6 +37,12 @@ func loadStuff(s: string): (FullMap[cstring], # Map
       result[2][0].incl(uint16(i))
     else:
       result[2][1].incl(i)
+  template add_ignore(rstart, rend: uint32) =
+    for i in rstart..rend:
+      if i <= high(uint16):
+        result[3][0].incl(uint16(i))
+      else:
+        result[3][1].incl(i)
   template add_ignore(i: uint32) =
     if i <= high(uint16):
       result[3][0].incl(uint16(i))
@@ -61,8 +67,7 @@ func loadStuff(s: string): (FullMap[cstring], # Map
       let fcs = firstcol.split("..")
       let rstart = uint32(parseHexInt(fcs[0]))
       let rend = uint32(parseHexInt(fcs[1]))
-      for i in rstart..rend:
-        temp(i)
+      temp(rstart, rend)
     else:
       temp(uint32(parseHexInt(firstcol)))