]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/utrie.cpp
ICU-59131.0.1.tar.gz
[apple/icu.git] / icuSources / common / utrie.cpp
index b8caeb722b30586bcc51d7459fec737e085b4d3f..ecf9b1cba72c6d06756b7965d5085f1e9a552eed 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 ******************************************************************************
 *
@@ -6,7 +8,7 @@
 *
 ******************************************************************************
 *   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;