You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Make sure variant parser actually writes floats when float property is requested, closes #3301
This commit is contained in:
@@ -1801,7 +1801,10 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
||||
} break;
|
||||
case Variant::REAL: {
|
||||
|
||||
p_store_string_func(p_store_string_ud, rtoss(p_variant.operator real_t()) );
|
||||
String s = rtoss(p_variant.operator real_t());
|
||||
if (s.find(".")==-1 && s.find("e")==-1)
|
||||
s+=".0";
|
||||
p_store_string_func(p_store_string_ud, s );
|
||||
} break;
|
||||
case Variant::STRING: {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user