Commit 7815372b authored by Haocheng Zhang's avatar Haocheng Zhang Committed by Facebook Github Bot 2

fix bug for negative shift value

Reviewed By: luciang

Differential Revision: D3407128

fbshipit-source-id: 2c00387d6e068f9e052f539198ae2f985d265c74
parent d27a9dba
......@@ -281,7 +281,7 @@ inline uint64_t fnv64(const std::string& str,
inline uint32_t hsieh_hash32_buf(const void* buf, size_t len) {
// forcing signed char, since other platforms can use unsigned
const signed char* s = reinterpret_cast<const signed char*>(buf);
const unsigned char* s = reinterpret_cast<const unsigned char*>(buf);
uint32_t hash = static_cast<uint32_t>(len);
uint32_t tmp;
size_t rem;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment