diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/snd_dma.c | 4 | ||||
-rw-r--r-- | src/client/snd_openal.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/snd_dma.c b/src/client/snd_dma.c index 5a333526..5db92f8a 100644 --- a/src/client/snd_dma.c +++ b/src/client/snd_dma.c @@ -545,7 +545,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 ); } @@ -1108,7 +1108,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 ); diff --git a/src/client/snd_openal.c b/src/client/snd_openal.c index bded5184..dc067be0 100644 --- a/src/client/snd_openal.c +++ b/src/client/snd_openal.c @@ -1140,7 +1140,7 @@ void S_AL_UpdateEntityPosition( int entityNum, const vec3_t origin ) VectorCopy( origin, sanOrigin ); S_AL_SanitiseVector( sanOrigin ); - if ( entityNum < 0 || entityNum > MAX_GENTITIES ) + if ( entityNum < 0 || entityNum >= MAX_GENTITIES ) Com_Error( ERR_DROP, "S_UpdateEntityPosition: bad entitynum %i", entityNum ); VectorCopy( sanOrigin, entityList[entityNum].origin ); } @@ -1154,7 +1154,7 @@ Necessary for i.g. Western Quake3 mod which is buggy. */ static qboolean S_AL_CheckInput(int entityNum, sfxHandle_t sfx) { - if (entityNum < 0 || entityNum > MAX_GENTITIES) + if (entityNum < 0 || entityNum >= MAX_GENTITIES) Com_Error(ERR_DROP, "ERROR: S_AL_CheckInput: bad entitynum %i", entityNum); if (sfx < 0 || sfx >= numSfx) |