From 8184bc11192b4107fa0c449513e4e42ead128b74 Mon Sep 17 00:00:00 2001 From: nheir Date: Sun, 2 Dec 2018 15:57:54 +0100 Subject: [PATCH] sanitize sv_player_slots --- src/game/server/gamecontext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 11d989c3b..1ef96d85e 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -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); } }