Merge pull request #114 from Laupetin/fix/invalid-playercounts

Ignore servers in serverlist that specify an invalid player count
This commit is contained in:
Dss0 2021-08-21 12:07:49 +02:00 committed by GitHub
commit 002dfa77c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -472,6 +472,11 @@ namespace Components
// Remove server from queue
i = ServerList::RefreshContainer.servers.erase(i);
// Servers with more than 18 players or less than 0 players are faking for sure
// So lets ignore those
if (server.clients > 18 || server.maxClients > 18 || server.clients < 0 || server.maxClients < 0)
return;
// Check if already inserted and remove
auto list = ServerList::GetList();
if (!list) return;