You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Fix Variant hashing for floats
Incorrectly hashed floats as single precision
(cherry picked from commit e6a9e0cdec)
This commit is contained in:
committed by
Yuri Sizov
parent
636d7905b0
commit
4da5fc9203
@@ -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();
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user