summaryrefslogtreecommitdiff
path: root/src/game/g_admin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_admin.c')
-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++ );
}
}