From: Hyunjee Kim Date: Mon, 10 Feb 2020 08:09:06 +0000 (+0900) Subject: Update API logic due to ICU upgrade X-Git-Tag: submit/tizen/20200212.052955~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3aabd111bb55256ae0229233570a175eeabf6e59;p=platform%2Fcore%2Fapi%2Fbase-utils.git Update API logic due to ICU upgrade * i18n_ulocale_add_likely_subtags * i18n_ulocale_minimize_subtags Change-Id: I121301c1fe9468d2f5132b53245074b15640fc07 Signed-off-by: Hyunjee Kim --- diff --git a/src/utils_i18n_ulocale.cpp b/src/utils_i18n_ulocale.cpp index 0eee156..57be422 100644 --- a/src/utils_i18n_ulocale.cpp +++ b/src/utils_i18n_ulocale.cpp @@ -413,7 +413,11 @@ int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_l i18n_error_code_e i18n_error; ERR_MAPPING(icu_error, i18n_error); I18N_ERR(i18n_error); - set_last_result(i18n_error); + + if(I18N_ERROR_BUFFER_OVERFLOW == i18n_error) + set_last_result(I18N_ERROR_INVALID_PARAMETER); + else + set_last_result(i18n_error); return needed_buffer_size; } @@ -428,7 +432,10 @@ int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_loc i18n_error_code_e i18n_error; ERR_MAPPING(icu_error, i18n_error); I18N_ERR(i18n_error); - set_last_result(i18n_error); + if(I18N_ERROR_BUFFER_OVERFLOW == i18n_error) + set_last_result(I18N_ERROR_INVALID_PARAMETER); + else + set_last_result(i18n_error); return needed_buffer_size; }