From 88b592f8295c2713963bffbe69ec9362e8cf1f0f Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 30 Jun 2023 11:52:01 +0800 Subject: [PATCH] - fix: crash when parsing files containing inline assembly code. --- NEWS.md | 1 + RedPandaIDE/parser/cppparser.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index bdeccf85..d8c75e58 100644 --- a/NEWS.md +++ b/NEWS.md @@ -18,6 +18,7 @@ Red Panda C++ Version 2.23 - fix: "typedef struct" that don't have definition of the struct is not correctly parsed. - enhancement: correctly highlight multiline raw string literals. - change: remove "Assembly" color scheme item (it's not used anymore). + - fix: crash when parsing files containing inline assembly code. Red Panda C++ Version 2.22 diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index d33f5109..395774ac 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -5904,7 +5904,7 @@ int CppParser::indexPassParenthesis(int index) int CppParser::indexPassBraces(int index) { int tokenCount = mTokenizer.tokenCount(); - while (tokenCount) { + while (indextext[0].unicode()) { case '{': return mTokenizer[index]->matchIndex+1;