Skip to content

Commit 1271964

Browse files
Update astutils.cpp [skip ci]
1 parent 6240b75 commit 1271964

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/astutils.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2690,7 +2690,7 @@ bool isVariableChanged(const Token *tok, int indirect, const Settings &settings,
26902690
};
26912691
tok2 = skipRedundantPtrOp(tok2, tok2->astParent());
26922692

2693-
if (tok2->astParent() && tok2->astParent()->isAssignmentOp() && (indirect - derefs - arrayAccess == 0 || tok2->astParent()->str() == "=")) {
2693+
if (tok2->astParent() && tok2->astParent()->isAssignmentOp() && (indirect - derefs - arrayAccess <= 0 || tok2->astParent()->str() == "=")) {
26942694
if (astIsLHS(tok2))
26952695
return true;
26962696
// Check if assigning to a non-const lvalue

0 commit comments

Comments
 (0)