about summary refs log tree commit diff stats
path: root/src/data
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-02-08 23:27:57 +0100
committerbptato <nincsnevem662@gmail.com>2022-02-08 23:27:57 +0100
commite2bb7da4f7ecd0c5bd7d45f2e9935b73aa062f69 (patch)
tree7cdd1d1765a2889a0b71bde1e04207585e619319 /src/data
parent4f5e4539a8671a0d67a64ba05d84d62a7c54071d (diff)
downloadchawan-e2bb7da4f7ecd0c5bd7d45f2e9935b73aa062f69.tar.gz
Fix bug in idna that prevented building release
Diffstat (limited to 'src/data')
-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)))