[icu] Make sure we return script UNKNOWN instead of INVALID
This commit is contained in:
parent
d02985ec5a
commit
03034acb8a
|
@ -157,6 +157,9 @@ hb_icu_get_script (hb_unicode_funcs_t *ufuncs,
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
UScriptCode scriptCode = uscript_getScript(unicode, &status);
|
||||
|
||||
if (unlikely (status != U_ZERO_ERROR))
|
||||
return HB_SCRIPT_UNKNOWN;
|
||||
|
||||
return hb_icu_script_to_script (scriptCode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue