]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/bytestriebuilder.cpp
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / common / bytestriebuilder.cpp
index 581505e0092b15525bc1966b9cb3a039912e4b10..ec1ab7d8f5080e5af15799fa8636d3ab98b0ec73 100644 (file)
@@ -339,7 +339,8 @@ BytesTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, UChar
 
 BytesTrieBuilder::BTLinearMatchNode::BTLinearMatchNode(const char *bytes, int32_t len, Node *nextNode)
         : LinearMatchNode(len, nextNode), s(bytes) {
-    hash=hash*37+ustr_hashCharsN(bytes, len);
+    hash=static_cast<int32_t>(
+        static_cast<uint32_t>(hash)*37u + static_cast<uint32_t>(ustr_hashCharsN(bytes, len)));
 }
 
 UBool