X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..HEAD:/icuSources/common/utrie.cpp diff --git a/icuSources/common/utrie.cpp b/icuSources/common/utrie.cpp index eb97aaa5..ecf9b1cb 100644 --- a/icuSources/common/utrie.cpp +++ b/icuSources/common/utrie.cpp @@ -1,12 +1,14 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ****************************************************************************** * -* Copyright (C) 2001-2011, International Business Machines +* Copyright (C) 2001-2012, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** * file name: utrie.cpp -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -139,7 +141,7 @@ utrie_clone(UNewTrie *fillIn, const UNewTrie *other, uint32_t *aliasData, int32_ uprv_free(aliasData); } else { uprv_memcpy(trie->index, other->index, sizeof(trie->index)); - uprv_memcpy(trie->data, other->data, other->dataLength*4); + uprv_memcpy(trie->data, other->data, (size_t)other->dataLength*4); trie->dataLength=other->dataLength; trie->isDataAllocated=isDataAllocated; } @@ -839,7 +841,7 @@ utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity, } /* write 32-bit data values */ - uprv_memcpy(dest16, trie->data, 4*trie->dataLength); + uprv_memcpy(dest16, trie->data, 4*(size_t)trie->dataLength); } return length; @@ -943,7 +945,7 @@ utrie_unserializeDummy(UTrie *trie, /* calculate the actual size of the dummy trie data */ /* max(Latin-1, block 0) */ - latin1Length= UTRIE_SHIFT<=8 ? 256 : UTRIE_DATA_BLOCK_LENGTH; + latin1Length= 256; /*UTRIE_SHIFT<=8 ? 256 : UTRIE_DATA_BLOCK_LENGTH;*/ trie->indexLength=UTRIE_BMP_INDEX_LENGTH+UTRIE_SURROGATE_BLOCK_COUNT; trie->dataLength=latin1Length;