diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-04-16 16:30:32 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-04-16 16:30:32 +0200 |
commit | 478059db9c632e4e628bc5cd80a5ecfdcfe07606 (patch) | |
tree | 666599f4bc3e08fa22ea92cc08ebd87a79c524d8 | |
parent | 480a1eb3e711f799a2ee1f0cf769862916fc8585 (diff) |
Check lookup[0].lo instead of a magic number
-rwxr-xr-x | gen/prop/hst | 2 | ||||
-rw-r--r-- | lib/unicode/prop/uprop_get_hst.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gen/prop/hst b/gen/prop/hst index f1af5df..3cb241d 100755 --- a/gen/prop/hst +++ b/gen/prop/hst @@ -49,7 +49,7 @@ END { print "enum uprop_hst" print "uprop_get_hst(rune ch)" print "{" - print "\treturn ch < RUNE_C(0x1100) ? HST_NA : mlib_lookup(ch);" + print "\treturn ch < lookup[0].lo ? HST_NA : mlib_lookup(ch);" print "}" } ' data/HangulSyllableType | sed 's/\s*$//' diff --git a/lib/unicode/prop/uprop_get_hst.c b/lib/unicode/prop/uprop_get_hst.c index 9ebfe1d..90d8d08 100644 --- a/lib/unicode/prop/uprop_get_hst.c +++ b/lib/unicode/prop/uprop_get_hst.c @@ -819,5 +819,5 @@ _MLIB_DEFINE_BSEARCH(enum uprop_hst, lookup, HST_NA) enum uprop_hst uprop_get_hst(rune ch) { - return ch < RUNE_C(0x1100) ? HST_NA : mlib_lookup(ch); + return ch < lookup[0].lo ? HST_NA : mlib_lookup(ch); } |