diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-11 09:37:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 09:37:35 +0200 |
commit | 7217a7edbd6beb265b3232953cbeaa9dcea62414 (patch) | |
tree | 28c2c9a44ff170aea356151f69d33f5963e4ad5b /core/math/expression.cpp | |
parent | 786fc63faa64dbab0c76e8b39de91585f87d546a (diff) | |
parent | ec164b2301034b3aa0fee4e4b93170404a2e4d98 (diff) |
Merge pull request #39230 from ntfshard/expression_string_singlequote
Fix for Expression class: string inside an expression can't be single quoted
Diffstat (limited to 'core/math/expression.cpp')
-rw-r--r-- | core/math/expression.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/math/expression.cpp b/core/math/expression.cpp index db3bf2f830..6421606ca2 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -896,6 +896,7 @@ Error Expression::_get_token(Token &r_token) { return OK; } + case '\'': case '"': { String str; while (true) { @@ -905,7 +906,8 @@ Error Expression::_get_token(Token &r_token) { _set_error("Unterminated String"); r_token.type = TK_ERROR; return ERR_PARSE_ERROR; - } else if (ch == '"') { + } else if (ch == cchar) { + // cchar contain a corresponding quote symbol break; } else if (ch == '\\') { //escaped characters... |