From: Peter Edberg Date: Mon, 9 Oct 2017 06:57:17 +0000 (+0000) Subject: ICU-13352 Fix ordering of limit test and array ref in ufmt_utop X-Git-Tag: release-60-rc~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7604adc4b33a8767b50afc6218dcd4651ac72c29;p=icu ICU-13352 Fix ordering of limit test and array ref in ufmt_utop X-SVN-Rev: 40602 --- diff --git a/icu4c/source/io/ufmt_cmn.cpp b/icu4c/source/io/ufmt_cmn.cpp index 42e8e3e5466..2b1a76fc8a2 100644 --- a/icu4c/source/io/ufmt_cmn.cpp +++ b/icu4c/source/io/ufmt_cmn.cpp @@ -187,7 +187,7 @@ ufmt_utop(const UChar *buffer, } /* iterate through buffer, stop when you hit the end */ - while(ufmt_isdigit(buffer[count], 16) && count < *len) { + while(count < *len && ufmt_isdigit(buffer[count], 16)) { /* increment the count consumed */ ++count; }