- fix: crash when parsing files containing inline assembly code.

This commit is contained in:
Roy Qu 2023-06-30 11:52:01 +08:00
parent e5e322dea4
commit 88b592f829
2 changed files with 2 additions and 1 deletions

View File

@ -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. - fix: "typedef struct" that don't have definition of the struct is not correctly parsed.
- enhancement: correctly highlight multiline raw string literals. - enhancement: correctly highlight multiline raw string literals.
- change: remove "Assembly" color scheme item (it's not used anymore). - 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 Red Panda C++ Version 2.22

View File

@ -5904,7 +5904,7 @@ int CppParser::indexPassParenthesis(int index)
int CppParser::indexPassBraces(int index) int CppParser::indexPassBraces(int index)
{ {
int tokenCount = mTokenizer.tokenCount(); int tokenCount = mTokenizer.tokenCount();
while (tokenCount) { while (index<tokenCount) {
switch(mTokenizer[index]->text[0].unicode()) { switch(mTokenizer[index]->text[0].unicode()) {
case '{': case '{':
return mTokenizer[index]->matchIndex+1; return mTokenizer[index]->matchIndex+1;