aboutsummaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@gahr.ch>2021-12-03 09:47:02 +0000
committerSteve Bennett <steveb@workware.net.au>2021-12-03 19:58:35 +1000
commit669f097ad84cfa090e3852b0bc82f5f238f960c0 (patch)
tree215e0357bfc0feefacfd3864c367ec583bdefa06 /utf8.c
parent3bf391ebe1a87c1fd0fc064254ef40976dff06f9 (diff)
downloadjimtcl-669f097ad84cfa090e3852b0bc82f5f238f960c0.zip
jimtcl-669f097ad84cfa090e3852b0bc82f5f238f960c0.tar.gz
jimtcl-669f097ad84cfa090e3852b0bc82f5f238f960c0.tar.bz2
Unicode ranges are closed intervals
E.g., see the hourglass character U+231B closing the range at line 1111 of the bundled EastAsianWidth.txt: https://github.com/msteveb/jimtcl/blob/3bf391ebe1a87c1fd0fc064254ef40976dff06f9/EastAsianWidth.txt#L1111
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index 405c20d..1a475ba 100644
--- a/utf8.c
+++ b/utf8.c
@@ -167,7 +167,7 @@ struct casemap {
struct utf8range {
unsigned lower; /* lower inclusive */
- unsigned upper; /* upper exclusive */
+ unsigned upper; /* upper inclusive */
};
@@ -202,7 +202,7 @@ static int cmp_range(const void *key, const void *cm)
if (ch < range->lower) {
return -1;
}
- if (ch >= range->upper) {
+ if (ch > range->upper) {
return 1;
}
return 0;