From b070d7b7a239aa7a8bb26d917bf2b57093a0159f Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Sat, 3 Oct 2009 12:50:51 +0000 Subject: * Fix some bugs with banning by client number introduced in revision 1189 --- src/game/g_admin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/game') 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++ ); } } -- cgit