diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-10-25 02:33:03 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-10-25 02:39:56 -0700 |
commit | 65e4e8427d900b27f579dc12af6c74b3ec628286 (patch) | |
tree | eff17ddb47e11f894826d921abe5b5634a74c168 /src/leveldb/util/hash.cc | |
parent | b847e0139eae06f4ea3c44ae414dc0110598a1be (diff) | |
parent | 5b9f8425a515739e2149bf5bfb2ae6ed60bfbaf2 (diff) |
Merge pull request #5093
4b0e2d7 Squashed 'src/leveldb/' changes from 7924331..7d41e6f (Pieter Wuille)
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; |