Skip to content

Commit

Permalink
Merge pull request #74600 from AThousandShips/hash_float_fix
Browse files Browse the repository at this point in the history
Fix Variant hashing for floats
  • Loading branch information
akien-mga committed Mar 8, 2023
2 parents 465306c + e6a9e0c commit 8defa73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/variant/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2941,7 +2941,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const {
return hash_one_uint64((uint64_t)_data._int);
} break;
case FLOAT: {
return hash_murmur3_one_float(_data._float);
return hash_murmur3_one_double(_data._float);
} break;
case STRING: {
return reinterpret_cast<const String *>(_data._mem)->hash();
Expand Down Expand Up @@ -3158,7 +3158,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const {
}
return hash_fmix32(h);
} else {
return hash_murmur3_one_float(0.0);
return hash_murmur3_one_double(0.0);
}

} break;
Expand Down

0 comments on commit 8defa73

Please sign in to comment.