Skip to content

Commit a178c86

Browse files
committed
Suppressions: fixed state update of existing suppression in addSuppression()
1 parent 9352b8c commit a178c86

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/suppressions.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ std::string Suppressions::addSuppression(Suppressions::Suppression suppression)
249249
auto foundSuppression = std::find_if(mSuppressions.begin(), mSuppressions.end(),
250250
std::bind(&Suppression::isSameParameters, &suppression, std::placeholders::_1));
251251
if (foundSuppression != mSuppressions.end()) {
252-
// Update matched state of existing global suppression
253-
if (!suppression.isLocal() && suppression.matched)
252+
if (suppression.checked)
253+
foundSuppression->checked = suppression.checked;
254+
if (suppression.matched)
254255
foundSuppression->matched = suppression.matched;
255256
return "";
256257
}

0 commit comments

Comments
 (0)