diff options
author | bptato <nincsnevem662@gmail.com> | 2022-02-08 23:27:57 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-02-08 23:27:57 +0100 |
commit | e2bb7da4f7ecd0c5bd7d45f2e9935b73aa062f69 (patch) | |
tree | 7cdd1d1765a2889a0b71bde1e04207585e619319 /src/data | |
parent | 4f5e4539a8671a0d67a64ba05d84d62a7c54071d (diff) | |
download | chawan-e2bb7da4f7ecd0c5bd7d45f2e9935b73aa062f69.tar.gz |
Fix bug in idna that prevented building release
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/idna.nim | 9 |
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))) |