diff options
author | bptato <nincsnevem662@gmail.com> | 2023-07-28 00:04:12 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-07-28 00:04:12 +0200 |
commit | ec37eee0d637cc36347cc1e6093c0027f80bdcc1 (patch) | |
tree | bfe29b77f76fc2ad28a7c0c930a6b9bba19cf9af /src/utils/twtstr.nim | |
parent | 7c5d2e7557064ab86b9ef525cc7b9499c135e53f (diff) | |
download | chawan-ec37eee0d637cc36347cc1e6093c0027f80bdcc1.tar.gz |
Fix twtstr.cmp
We were comparing the wrong sides of ranges here.
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index df67b8f3..9273b703 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -927,9 +927,9 @@ const Combining = [ ] func cmp(range: (uint32, uint32), r: Rune): int = - if range[0] < cast[uint32](r): + if range[1] < cast[uint32](r): return -1 - elif range[1] > cast[uint32](r): + elif range[0] > cast[uint32](r): return 1 return 0 |