diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:22:21 +0200 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:22:21 +0200 |
| commit | 1d8b9e17ea13630aec475484da09ebba0366f7c8 (patch) | |
| tree | 0c801f68561bfb0930a4ade80d7ca3a7940887ab /lib/unictype/scripts.c | |
| parent | 84e26c587987e8484d55db4165f188b40c09e94b (diff) | |
| parent | 630f99f29bd31a76d8d24da2975a045452c763ef (diff) | |
Merge branch 'feature/upstream' into develop
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]; |
