Skip to content

Commit

Permalink
BUrlContext: fix logic reversal in certificate comparison
Browse files Browse the repository at this point in the history
The Predicate for BObjectList::FindIf must actually be a difference
operator, and return 0 if there is a match.
  • Loading branch information
pulkomandy committed Nov 9, 2015
1 parent 4849ab6 commit 55af491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/kits/network/libnetapi/UrlContext.cpp
Expand Up @@ -159,7 +159,8 @@ BUrlContext::HasCertificateException(const BCertificate& certificate)

int operator()(const BCertificate* item) const
{
return *item == fItemToMatch;
/* Must return 0 if there is a match! */
return !(*item == fItemToMatch);
}

const BCertificate& fItemToMatch;
Expand Down

0 comments on commit 55af491

Please sign in to comment.