浏览代码

Make parser treat all exponent literals as float

(cherry picked from commit 1305ff92f79f3ae4d84e8a92f5caedda94e076cb)
Hayden 3 年之前
父节点
当前提交
d47214f344
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      core/math/expression.cpp

+ 1 - 3
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 {