summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-22 10:02:42 -0300
committerGitHub <noreply@github.com>2017-08-22 10:02:42 -0300
commit8a4e05a440d53be6247ee14c6b4928c07b4a83ae (patch)
tree698925f76207e811cf3e31992e7b10022dbc94a9
parent19e12424fc1786e24b372c2b62d9fbf262bfc227 (diff)
parent6759a28050885a25803e9bcb7fd53e38ea16ecf3 (diff)
Merge pull request #10520 from RandomShaper/fix-double-parsing
Fix tokenization of doubles
-rw-r--r--core/variant_parser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 398f20caf3..5aa71f6704 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -326,6 +326,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
is_float = true;
} else if (c == 'e') {
reading = READING_EXP;
+ is_float = true;
} else {
reading = READING_DONE;
}
@@ -337,7 +338,6 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
} else if (c == 'e') {
reading = READING_EXP;
-
} else {
reading = READING_DONE;
}
@@ -349,8 +349,6 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
exp_beg = true;
} else if ((c == '-' || c == '+') && !exp_sign && !exp_beg) {
- if (c == '-')
- is_float = true;
exp_sign = true;
} else {