]> granicus.if.org Git - icu/commitdiff
ICU-13352 Fix ordering of limit test and array ref in ufmt_utop
authorPeter Edberg <pedberg@unicode.org>
Mon, 9 Oct 2017 06:57:17 +0000 (06:57 +0000)
committerPeter Edberg <pedberg@unicode.org>
Mon, 9 Oct 2017 06:57:17 +0000 (06:57 +0000)
X-SVN-Rev: 40602

icu4c/source/io/ufmt_cmn.cpp

index 42e8e3e546667029f03b112c57bf67b35010a6ba..2b1a76fc8a2984426f0443bd4c341ea288d29361 100644 (file)
@@ -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;
     }