Fix object hashing in schema
This commit is contained in:
parent
b4a6da3e63
commit
eee82cb078
@ -367,7 +367,9 @@ public:
|
||||
uint64_t h = Hash(0, kObjectType);
|
||||
uint64_t* kv = stack_.template Pop<uint64_t>(memberCount * 2);
|
||||
for (SizeType i = 0; i < memberCount; i++)
|
||||
h ^= Hash(kv[i * 2], kv[i * 2 + 1]); // Use xor to achieve member order insensitive
|
||||
// Issue #2205
|
||||
// Hasing the key to avoid key=value cases with bug-prone zero-value hash
|
||||
h ^= Hash(Hash(0, kv[i * 2]), kv[i * 2 + 1]); // Use xor to achieve member order insensitive
|
||||
*stack_.template Push<uint64_t>() = h;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user