diff options
Diffstat (limited to 'src/leveldb/util/hash.cc')
-rw-r--r-- | src/leveldb/util/hash.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leveldb/util/hash.cc b/src/leveldb/util/hash.cc index 07cf022060..ed439ce7a2 100644 --- a/src/leveldb/util/hash.cc +++ b/src/leveldb/util/hash.cc @@ -34,13 +34,13 @@ uint32_t Hash(const char* data, size_t n, uint32_t seed) { // Pick up remaining bytes switch (limit - data) { case 3: - h += data[2] << 16; + h += static_cast<unsigned char>(data[2]) << 16; FALLTHROUGH_INTENDED; case 2: - h += data[1] << 8; + h += static_cast<unsigned char>(data[1]) << 8; FALLTHROUGH_INTENDED; case 1: - h += data[0]; + h += static_cast<unsigned char>(data[0]); h *= m; h ^= (h >> r); break; |