Skip to content

Commit 66897a9

Browse files
committed
Merge pull request #727 from Dmitry-Me/fixC4706
Fix C4706 assignment within conditional
2 parents 454df6d + 4a8a5d4 commit 66897a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tokenlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ void TokenList::validateAst()
10731073

10741074
// check for endless recursion
10751075
const Token* parent=tok;
1076-
while ((parent = parent->astParent())) {
1076+
while ((parent = parent->astParent()) != nullptr) {
10771077
if (parent==tok)
10781078
throw InternalError(tok, "AST broken: endless recursion from '" + tok->str() + "'", InternalError::SYNTAX);
10791079
}

0 commit comments

Comments
 (0)