mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Range check client number for trap_BotUserCommand
This commit is contained in:
parent
5b9302a7ef
commit
1a8bf792e7
1 changed files with 7 additions and 1 deletions
|
@ -465,7 +465,13 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
|
|||
case BOTLIB_GET_CONSOLE_MESSAGE:
|
||||
return SV_BotGetConsoleMessage( args[1], VMA(2), args[3] );
|
||||
case BOTLIB_USER_COMMAND:
|
||||
SV_ClientThink( &svs.clients[args[1]], VMA(2) );
|
||||
{
|
||||
int clientNum = args[1];
|
||||
|
||||
if ( clientNum >= 0 && clientNum < sv_maxclients->integer ) {
|
||||
SV_ClientThink( &svs.clients[clientNum], VMA(2) );
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
case BOTLIB_AAS_BBOX_AREAS:
|
||||
|
|
Loading…
Reference in a new issue