diff options
author | Russell Brenner <russellbrenner@google.com> | 2011-12-14 09:18:46 -0800 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2011-12-14 09:18:46 -0800 |
commit | c8f4ca0ba9aee81cc4578386149056779e94be2a (patch) | |
tree | 63c5ed34a29a7f0876b837a58173e91ed4a09a89 | |
parent | e39b0cc5a6606880051b7bd6a101399cc687eabe (diff) | |
download | harfbuzz-c8f4ca0ba9aee81cc4578386149056779e94be2a.tar.gz |
Fix double comparison
Fabrice's earlier change to hb_utf16_script_run_prev also applies to
hb_utf16_script_run_next, essentially replacing a == b == c with
a == c && b == c.
Change-Id: I996bdac2837ceb061792d6fc20ce9e2d3f2c9480
-rwxr-xr-x | contrib/harfbuzz-unicode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/harfbuzz-unicode.c b/contrib/harfbuzz-unicode.c index 0a34b65..6b4778c 100755 --- a/contrib/harfbuzz-unicode.c +++ b/contrib/harfbuzz-unicode.c @@ -114,7 +114,10 @@ hb_utf16_script_run_next(unsigned *num_code_points, HB_ScriptItem *output, const HB_Script script = code_point_to_script(cp); if (script != current_script) { - if (current_script == init_script == HB_Script_Inherited) { + /* BEGIN android-changed + The condition was not correct by doing "a == b == constant" + END android-changed */ + if (current_script == HB_Script_Inherited && init_script == HB_Script_Inherited) { // If we started off as inherited, we take whatever we can find. output->script = script; current_script = script; |