Make it easier to rationate about the code

This commit is contained in:
sago007 2018-12-01 22:45:17 +01:00
parent 1048e68b91
commit b40d886115

View file

@ -2480,10 +2480,10 @@ qboolean G_admin_admintest( gentity_t *ent, int skiparg )
}
}
if (!found) {
if (!found || i == MAX_ADMIN_ADMINS) {
//The i == MAX_ADMIN_ADMINS check makes it easier for static analysers to rationate about the code
return qfalse;
}
l = g_admin_admins[ i ]->level;
for( i = 0; i < MAX_ADMIN_LEVELS && g_admin_levels[ i ]; i++ ) {
if( g_admin_levels[ i ]->level != l )