Merge pull request #7493 from Robyt3/Community-Info-Condition-Fix

Fix inverted community parsing conditions
This commit is contained in:
heinrich5991 2023-11-18 22:10:45 +00:00 committed by GitHub
commit 7b16460334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1296,13 +1296,13 @@ void CServerBrowser::LoadDDNetServers()
continue;
}
CCommunity NewCommunity(Id, Name, ParsedIconSha256, IconUrl);
if(ParseCommunityServers(&NewCommunity, *pServers))
if(!ParseCommunityServers(&NewCommunity, *pServers))
{
log_error("serverbrowser", "invalid community servers (CommunityId=%s)", NewCommunity.Id());
continue;
}
NewCommunity.m_HasFinishes = pFinishes->type == json_array;
if(NewCommunity.m_HasFinishes && ParseCommunityFinishes(&NewCommunity, *pFinishes))
if(NewCommunity.m_HasFinishes && !ParseCommunityFinishes(&NewCommunity, *pFinishes))
{
log_error("serverbrowser", "invalid community finishes (CommunityId=%s)", NewCommunity.Id());
continue;