summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-10-03 12:50:51 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:16 +0000
commitb070d7b7a239aa7a8bb26d917bf2b57093a0159f (patch)
tree79141a56340667838bd2ed0b9c781df5ceefa00d /src
parent443b49d8ce6aabd6c8290275fc3eef05b3374dd3 (diff)
* Fix some bugs with banning by client number introduced in revision 1189
Diffstat (limited to 'src')
-rw-r--r--src/game/g_admin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index e8238e71..d2125dd7 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -1573,11 +1573,12 @@ qboolean G_admin_ban( gentity_t *ent, int skiparg )
if( !search[ i ] )
{
i = atoi( search );
- if( level.clients[ i ].pers.connected != CON_DISCONNECTED )
+ if( i < MAX_CLIENTS &&
+ level.clients[ i ].pers.connected != CON_DISCONNECTED )
{
logmatches = 1;
exactmatch = qtrue;
- for( logmatch = 0; g_admin_namelog[ i ]->slot != i; logmatch++ );
+ for( logmatch = 0; g_admin_namelog[ logmatch ]->slot != i; logmatch++ );
}
}