diff options
author | Zack Middleton <zturtleman@gmail.com> | 2012-11-18 19:09:54 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-12 21:24:47 +0000 |
commit | b85440e07f3d91e30bcf36b1e95310fd1d5ee4b5 (patch) | |
tree | 5aadbeb23b8f294ab2ecd84d5fc63f72309364b1 /src/client | |
parent | a8a2e4faf5844aa5017b4a1a400509e434752b33 (diff) |
Fix some "> MAX_*" to be ">= MAX_*".
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) |