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;