From ce979454400c3870717ba40b1065a2f3727cfb93 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 22 Oct 2017 18:23:38 -0400 Subject: [PATCH] [icu] Fix error check --- src/hb-icu.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-icu.cc b/src/hb-icu.cc index a00803c98..01d15f48e 100644 --- a/src/hb-icu.cc +++ b/src/hb-icu.cc @@ -332,13 +332,13 @@ hb_icu_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED, /* Normalise the codepoint using NFKD mode. */ icu_err = U_ZERO_ERROR; len = unorm2_normalize (unorm2_getNFKDInstance (&icu_err), utf16, len, normalized, ARRAY_LENGTH (normalized), &icu_err); - if (icu_err) + if (U_FAILURE (icu_err)) return 0; /* Convert the decomposed form from UTF-16 to UTF-32. */ icu_err = U_ZERO_ERROR; u_strToUTF32 ((UChar32*) decomposed, HB_UNICODE_MAX_DECOMPOSITION_LEN, &utf32_len, normalized, len, &icu_err); - if (icu_err) + if (U_FAILURE (icu_err)) return 0; return utf32_len;