Fix some "> MAX_*" to be ">= MAX_*".

This commit is contained in:
Zack Middleton 2012-11-18 19:09:54 +00:00
parent d635193e19
commit 82f83cd092
5 changed files with 8 additions and 8 deletions

View file

@ -529,7 +529,7 @@ static void S_Base_StartSoundEx( vec3_t origin, int entityNum, int entchannel, s
return;
}
if ( !origin && ( entityNum < 0 || entityNum > MAX_GENTITIES ) ) {
if ( !origin && ( entityNum < 0 || entityNum >= MAX_GENTITIES ) ) {
Com_Error( ERR_DROP, "S_StartSound: bad entitynum %i", entityNum );
}
@ -1092,7 +1092,7 @@ let the sound system know where an entity currently is
======================
*/
void S_Base_UpdateEntityPosition( int entityNum, const vec3_t origin ) {
if ( entityNum < 0 || entityNum > MAX_GENTITIES ) {
if ( entityNum < 0 || entityNum >= MAX_GENTITIES ) {
Com_Error( ERR_DROP, "S_UpdateEntityPosition: bad entitynum %i", entityNum );
}
VectorCopy( origin, loopSounds[entityNum].origin );