From 0dad9322f3a10bd5d57003ae605fdc993450741e Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 20 Apr 2023 15:08:41 +0800 Subject: [PATCH] fix: invalid identifier check --- source/libs/parser/src/parTokenizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 312584994f..49da87dc16 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -692,7 +692,7 @@ SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr, bool* pIgnoreC len = tGetToken(&str[*i + t0.n + 1], &type); // only id and string are valid - if ((TK_NK_STRING != t0.type) && (TK_NK_ID != t0.type)) { + if (((TK_NK_STRING != t0.type) && (TK_NK_ID != t0.type)) || ((TK_NK_STRING != type) && (TK_NK_ID != type))) { t0.type = TK_NK_ILLEGAL; t0.n = 0;