]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/collationdatareader.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / i18n / collationdatareader.cpp
index 636eb14b7c70cb63c45ff6ea05738dc8c28329cd..0eb1861343cdfda8d7198733851b5224736d75dc 100644 (file)
@@ -419,7 +419,8 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
             tailoring.data, ts, fastLatinPrimaries, UPRV_LENGTHOF(fastLatinPrimaries));
     if(options == ts.options && ts.variableTop != 0 &&
             reorderCodesLength == ts.reorderCodesLength &&
-            uprv_memcmp(reorderCodes, ts.reorderCodes, reorderCodesLength * 4) == 0 &&
+            (reorderCodesLength == 0 ||
+                uprv_memcmp(reorderCodes, ts.reorderCodes, reorderCodesLength * 4) == 0) &&
             fastLatinOptions == ts.fastLatinOptions &&
             (fastLatinOptions < 0 ||
                 uprv_memcmp(fastLatinPrimaries, ts.fastLatinPrimaries,