From c1176206a8bf2680b7ec1b2f00a10b5b93070469 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Tue, 23 Jun 2020 12:58:50 -0300 Subject: [PATCH] Fixed CORE-6340 - Alternate quoting does not work on some particular cases. --- src/dsql/Parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dsql/Parser.cpp b/src/dsql/Parser.cpp index 6d7667814c..5889d6f5cc 100644 --- a/src/dsql/Parser.cpp +++ b/src/dsql/Parser.cpp @@ -773,9 +773,9 @@ int Parser::yylexAux() while (++lex.ptr + 1 < lex.end) { - if (*lex.ptr == endChar && *++lex.ptr == '\'') + if (*lex.ptr == endChar && lex.ptr[1] == '\'') { - size_t len = lex.ptr - lex.last_token - 4; + size_t len = ++lex.ptr - lex.last_token - 4; if (len > MAX_STR_SIZE) {