From: divverent Date: Fri, 19 Apr 2013 09:40:43 +0000 (+0000) Subject: fix endless loop with gcc 4.8 X-Git-Tag: xonotic-v0.8.0~96^2~95 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=bf67ce48eef7f1a0c73d6375611f166af27ee6c8;p=xonotic%2Fdarkplaces.git fix endless loop with gcc 4.8 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11945 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_particles.c b/cl_particles.c index d4febd9a..941c638e 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -1648,7 +1648,7 @@ CL_EntityParticles */ void CL_EntityParticles (const entity_t *ent) { - int i; + int i, j; vec_t pitch, yaw, dist = 64, beamlength = 16; vec3_t org, v; static vec3_t avelocities[NUMVERTEXNORMALS]; @@ -1658,8 +1658,9 @@ void CL_EntityParticles (const entity_t *ent) Matrix4x4_OriginFromMatrix(&ent->render.matrix, org); if (!avelocities[0][0]) - for (i = 0;i < NUMVERTEXNORMALS * 3;i++) - avelocities[0][i] = lhrandom(0, 2.55); + for (i = 0;i < NUMVERTEXNORMALS;i++) + for (j = 0;j < 3;j++) + avelocities[i][j] = lhrandom(0, 2.55); for (i = 0;i < NUMVERTEXNORMALS;i++) {