Merge pull request #1758 from nheir/patch/playerslots

sanitize sv_player_slots
This commit is contained in:
oy 2018-12-02 16:10:49 +01:00 committed by GitHub
commit cee6f306c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1370,6 +1370,8 @@ void CGameContext::ConchainSettingUpdate(IConsole::IResult *pResult, void *pUser
if(pResult->NumArguments())
{
CGameContext *pSelf = (CGameContext *)pUserData;
if(pSelf->Server()->MaxClients() < g_Config.m_SvPlayerSlots)
g_Config.m_SvPlayerSlots = pSelf->Server()->MaxClients();
pSelf->SendSettings(-1);
}
}