From ef3f9a010bde51c9a03fc0de263927ad8eb320fa Mon Sep 17 00:00:00 2001
From: havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Wed, 14 Feb 2007 06:54:24 +0000
Subject: [PATCH] added bounding of info->particleaccumulator so that bogus
 values won't cause a very long loop

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6838 d7cf8633-e32d-0410-b094-e92efae38249
---
 cl_particles.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cl_particles.c b/cl_particles.c
index c0238225..8b80cadd 100644
--- a/cl_particles.c
+++ b/cl_particles.c
@@ -1119,6 +1119,7 @@ void CL_ParticleTrail(int effectnameindex, float pcount, const vec3_t originmins
 						info->particleaccumulator += info->countabsolute + pcount * info->countmultiplier * cl_particles_quality.value;
 						trailstep = 0;
 					}
+					info->particleaccumulator = bound(0, info->particleaccumulator, 16384);
 					for (;info->particleaccumulator >= 1;info->particleaccumulator--)
 					{
 						if (info->tex[1] > info->tex[0])
-- 
2.39.5