From a822d1f1330f9ce9a780a690512840550e0645e7 Mon Sep 17 00:00:00 2001 From: "ntfs.hard" Date: Tue, 2 Jun 2020 02:02:01 +0300 Subject: [PATCH] Fix for Expression class: inner string can be single quoted (cherry picked from commit ec164b2301034b3aa0fee4e4b93170404a2e4d98) --- core/math/expression.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 88b72cc2ec4..f13a1880009 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -1004,6 +1004,7 @@ Error Expression::_get_token(Token &r_token) { return OK; }; + case '\'': case '"': { String str; @@ -1015,7 +1016,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...