Fix swapped high and low offset basis values

This commit is contained in:
Aikawa Yataro 2023-09-28 09:12:19 +02:00 committed by Milo Yip
parent eee82cb078
commit 6f79698b35

View File

@ -407,7 +407,7 @@ private:
bool WriteBuffer(Type type, const void* data, size_t len) { bool WriteBuffer(Type type, const void* data, size_t len) {
// FNV-1a from http://isthe.com/chongo/tech/comp/fnv/ // FNV-1a from http://isthe.com/chongo/tech/comp/fnv/
uint64_t h = Hash(RAPIDJSON_UINT64_C2(0x84222325, 0xcbf29ce4), type); uint64_t h = Hash(RAPIDJSON_UINT64_C2(0xcbf29ce4, 0x84222325), type);
const unsigned char* d = static_cast<const unsigned char*>(data); const unsigned char* d = static_cast<const unsigned char*>(data);
for (size_t i = 0; i < len; i++) for (size_t i = 0; i < len; i++)
h = Hash(h, d[i]); h = Hash(h, d[i]);