diff options
author | Pietro Cerutti <gahr@gahr.ch> | 2021-12-03 09:47:02 +0000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2021-12-03 19:58:35 +1000 |
commit | 669f097ad84cfa090e3852b0bc82f5f238f960c0 (patch) | |
tree | 215e0357bfc0feefacfd3864c367ec583bdefa06 /utf8.c | |
parent | 3bf391ebe1a87c1fd0fc064254ef40976dff06f9 (diff) | |
download | jimtcl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |