Skip to content

Commit c36bafd

Browse files
committed
Suppressions: fixed state update of existing suppression in addSuppression()
1 parent cd37df3 commit c36bafd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: lib/suppressions.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ std::string Suppressions::addSuppression(Suppressions::Suppression suppression)
245245
auto foundSuppression = std::find_if(mSuppressions.begin(), mSuppressions.end(),
246246
std::bind(&Suppression::isSameParameters, &suppression, std::placeholders::_1));
247247
if (foundSuppression != mSuppressions.end()) {
248-
// Update matched state of existing global suppression
249-
if (!suppression.isLocal() && suppression.matched)
248+
if (suppression.checked)
249+
foundSuppression->checked = suppression.checked;
250+
if (suppression.matched)
250251
foundSuppression->matched = suppression.matched;
251252
return "";
252253
}

0 commit comments

Comments
 (0)