diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-03-22 18:00:25 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-03-22 18:00:25 +0100 |
commit | 0737819efdd0bae112d16d874cac7e747e43cd08 (patch) | |
tree | 98a9ac84f7f347ae530c14852c68870682f3d04c /lib/unictype/scripts.c | |
parent | 163a663518f33bab48b28431972e580b366b4d49 (diff) | |
parent | e670957a8693f860cf7d77fed4ce6b4b056a8083 (diff) |
Merge branch 'release/debian/1.3-1'debian/1.3-1
Diffstat (limited to 'lib/unictype/scripts.c')
-rw-r--r-- | lib/unictype/scripts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/unictype/scripts.c b/lib/unictype/scripts.c index a226d8da..1d9d13aa 100644 --- a/lib/unictype/scripts.c +++ b/lib/unictype/scripts.c @@ -35,11 +35,11 @@ uc_script (ucs4_t uc) if (lookup1 >= 0) { unsigned int index2 = (uc >> script_header_2) & script_header_3; - int lookup2 = u_script.level2[lookup1 + index2]; - if (lookup2 >= 0) + unsigned int lookup2 = u_script.level2[lookup1 + index2]; + if (lookup2 > 0) { unsigned int index3 = (uc & script_header_4); - unsigned char lookup3 = u_script.level3[lookup2 + index3]; + unsigned char lookup3 = u_script.level3[(lookup2 - 1) + index3]; if (lookup3 != 0xff) return &scripts[lookup3]; |