summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTony J. White <tjw@tjw.org>2007-03-21 22:55:16 +0000
committerTony J. White <tjw@tjw.org>2007-03-21 22:55:16 +0000
commitcb5b4648d45b3f078a6ae3da45707764ca46e241 (patch)
treefcf9a852da5e9e122846ceea4a964ba60458ee0c /src
parent92aef352781f108326247a2fbc44ccded8f230ef (diff)
* clearer fix for particle system crash
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_particles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c
index eacb84c5..f9da4db3 100644
--- a/src/cgame/cg_particles.c
+++ b/src/cgame/cg_particles.c
@@ -138,7 +138,7 @@ static particle_t *CG_SpawnNewParticle( baseParticle_t *bp, particleEjector_t *p
vec3_t attachmentPoint, attachmentVelocity;
vec3_t transform[ 3 ];
- for( i = 0; i < MAX_PARTICLES - 1 ; i++ )
+ for( i = 0; i < MAX_PARTICLES; i++ )
{
p = &particles[ i ];
@@ -2225,7 +2225,7 @@ static void CG_CompactAndSortParticles( void )
if( sortedParticles[ i ]->valid )
{
//find the first hole
- while( sortedParticles[ j ]->valid )
+ while( j < MAX_PARTICLES && sortedParticles[ j ]->valid )
j++;
//no more holes