From 6d867b6d13539c7986b3913e1224a8f62d296a30 Mon Sep 17 00:00:00 2001 From: Hayden Date: Sat, 5 Feb 2022 00:14:49 +1300 Subject: [PATCH] Make parser treat all exponent literals as float (cherry picked from commit 1305ff92f79f3ae4d84e8a92f5caedda94e076cb) --- core/math/expression.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 668a297b40c..280dbe27dce 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -1050,6 +1050,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; } @@ -1086,9 +1087,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 {