X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/2ca993e82fb37b597a3c73ecd1586a139a6579c5..1a147d096ae81f4c8262f7bfc56bd19fc2dee932:/icuSources/i18n/collationdatareader.cpp diff --git a/icuSources/i18n/collationdatareader.cpp b/icuSources/i18n/collationdatareader.cpp index f7098f98..0eb18613 100644 --- a/icuSources/i18n/collationdatareader.cpp +++ b/icuSources/i18n/collationdatareader.cpp @@ -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,