mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Merge commit godotengine/godot@ad9abe841d
This commit is contained in:
@@ -443,7 +443,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
|
||||
} else if (c == '.') {
|
||||
reading = READING_DEC;
|
||||
is_float = true;
|
||||
} else if (c == 'e') {
|
||||
} else if (c == 'e' || c == 'E') {
|
||||
reading = READING_EXP;
|
||||
is_float = true;
|
||||
} else {
|
||||
@@ -453,7 +453,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
|
||||
} break;
|
||||
case READING_DEC: {
|
||||
if (is_digit(c)) {
|
||||
} else if (c == 'e') {
|
||||
} else if (c == 'e' || c == 'E') {
|
||||
reading = READING_EXP;
|
||||
} else {
|
||||
reading = READING_DONE;
|
||||
@@ -1226,7 +1226,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
|
||||
r_err_str = String();
|
||||
value_type = Variant::OBJECT;
|
||||
value_class_name = token.value;
|
||||
got_comma_token = true;
|
||||
got_bracket_token = true;
|
||||
} else {
|
||||
return err;
|
||||
}
|
||||
@@ -1964,7 +1964,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
|
||||
case Variant::FLOAT: {
|
||||
String s = rtos_fix(p_variant.operator double());
|
||||
if (s != "inf" && s != "inf_neg" && s != "nan") {
|
||||
if (!s.contains_char('.') && !s.contains_char('e')) {
|
||||
if (!s.contains_char('.') && !s.contains_char('e') && !s.contains_char('E')) {
|
||||
s += ".0";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user