diff options
author | M. Kristall <mkpdev@gmail.com> | 2009-10-03 12:50:51 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:16 +0000 |
commit | b070d7b7a239aa7a8bb26d917bf2b57093a0159f (patch) | |
tree | 79141a56340667838bd2ed0b9c781df5ceefa00d /src/game | |
parent | 443b49d8ce6aabd6c8290275fc3eef05b3374dd3 (diff) |
* Fix some bugs with banning by client number introduced in revision 1189
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 5 |
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++ ); } } |