You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Correct hash behavior for floating point numbers
This backports the work in #7815 and the subsequent fixes in #8393 The following program now works as expected in this branch in both release_debug and debug mode: ```gdscript print(sqrt(-1)) print(sqrt(-1)) var simple1=asin(10.0) var simple2=acos(10.0) print(simple1) print(simple2) ``` And successfully prints -nan 4 times This fixes #9580 and fixes #8925
This commit is contained in:
@@ -1124,9 +1124,9 @@ Vector<uint8_t> GDTokenizerBuffer::parse_code_string(const String &p_code) {
|
||||
|
||||
Vector<uint8_t> buf;
|
||||
|
||||
Map<StringName, int> identifier_map;
|
||||
HashMap<Variant, int, VariantHasher> constant_map;
|
||||
Map<uint32_t, int> line_map;
|
||||
Map<StringName,int> identifier_map;
|
||||
HashMap<Variant,int,VariantHasher,VariantComparator> constant_map;
|
||||
Map<uint32_t,int> line_map;
|
||||
Vector<uint32_t> token_array;
|
||||
|
||||
GDTokenizerText tt;
|
||||
|
||||
Reference in New Issue
Block a user