]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/collationdatareader.cpp
ICU-64252.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / collationdatareader.cpp
index f7098f984199dda286b5843270e3d9c0f5554247..0eb1861343cdfda8d7198733851b5224736d75dc 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 * Copyright (C) 2013-2015, International Business Machines
@@ -417,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,