Skip to content

Commit 63d1511

Browse files
Update valueflow.cpp
1 parent 85583d9 commit 63d1511

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/valueflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4531,7 +4531,7 @@ struct ConditionHandler {
45314531
}
45324532

45334533
// Variable changed in loop code
4534-
const Token* const start = top;
4534+
const Token* const start = top->strAt(-1) == "for" ? top->astOperand2() : top; // skip init statement
45354535
const Token* const block = top->link()->next();
45364536
const Token* const end = block->link();
45374537

0 commit comments

Comments
 (0)