projects
/
apps
/
core
/
preloaded
/
video-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d02985e
)
[icu] Make sure we return script UNKNOWN instead of INVALID
author
Behdad Esfahbod
<behdad@behdad.org>
Mon, 2 May 2011 16:37:45 +0000
(12:37 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Mon, 2 May 2011 16:37:45 +0000
(12:37 -0400)
src/hb-icu.cc
patch
|
blob
|
history
diff --git
a/src/hb-icu.cc
b/src/hb-icu.cc
index
52645fd
..
9b94a94
100644
(file)
--- a/
src/hb-icu.cc
+++ b/
src/hb-icu.cc
@@
-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);
}