ICU-13008 Signed int overflow (undefined behavior) in datefmt.cpp

X-SVN-Rev: 39718
This commit is contained in:
Andy Heninger 2017-03-01 21:59:38 +00:00
parent abc3231fb2
commit 80606f5b57

View file

@ -80,7 +80,7 @@ public:
fSkeleton(other.fSkeleton) { }
virtual ~DateFmtBestPatternKey();
virtual int32_t hashCode() const {
return 37 * LocaleCacheKey<DateFmtBestPattern>::hashCode() + fSkeleton.hashCode();
return (int32_t)(37u * (uint32_t)LocaleCacheKey<DateFmtBestPattern>::hashCode() + (uint32_t)fSkeleton.hashCode());
}
virtual UBool operator==(const CacheKeyBase &other) const {
// reflexive