mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 09:21:03 +00:00
ICU-12559 avoid signed int overflow in hash computation; it's undefined behavior.
X-SVN-Rev: 38782
This commit is contained in:
parent
41fed01112
commit
030c63afd6
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ class LocaleCacheKey : public CacheKey<T> {
|
|||
: CacheKey<T>(other), fLoc(other.fLoc) { }
|
||||
virtual ~LocaleCacheKey() { }
|
||||
virtual int32_t hashCode() const {
|
||||
return 37 *CacheKey<T>::hashCode() + fLoc.hashCode();
|
||||
return (int32_t)(37u * (uint32_t)CacheKey<T>::hashCode() + (uint32_t)fLoc.hashCode());
|
||||
}
|
||||
virtual UBool operator == (const CacheKeyBase &other) const {
|
||||
// reflexive
|
||||
|
|
Loading…
Add table
Reference in a new issue