summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorHayden <Haydenleete@gmail.com>2022-02-05 00:14:49 +1300
committerHayden <Haydenleete@gmail.com>2022-02-05 16:34:26 +1300
commit1305ff92f79f3ae4d84e8a92f5caedda94e076cb (patch)
treeeba982c8f2f49e16b2b9f000c6c33a36883bf2a4 /core/math
parent29c4644890c82f38f54553fa127a9661e7a0c75a (diff)
Make parser treat all exponent literals as float
Diffstat (limited to 'core/math')
-rw-r--r--core/math/expression.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index 0bd8a0abb5..87f8a95970 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -373,6 +373,7 @@ Error Expression::_get_token(Token &r_token) {
is_float = true;
} else if (c == 'e') {
reading = READING_EXP;
+ is_float = true;
} else {
reading = READING_DONE;
}
@@ -409,9 +410,6 @@ Error Expression::_get_token(Token &r_token) {
exp_beg = true;
} else if ((c == '-' || c == '+') && !exp_sign && !exp_beg) {
- if (c == '-') {
- is_float = true;
- }
exp_sign = true;
} else {