r_part.c (R_EntityParticles): fix undefined behavior in the loop

init'ing avelocities, thanks to a -Waggressive-loop-optimizations
warning from gcc-4.8.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@842 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2013-03-15 12:47:08 +00:00
parent a48023899f
commit 472bcb8c28

View file

@ -202,8 +202,12 @@ void R_EntityParticles (entity_t *ent)
if (!avelocities[0][0])
{
for (i = 0; i < NUMVERTEXNORMALS*3; i++)
avelocities[0][i] = (rand() & 255) * 0.01;
for (i = 0; i < NUMVERTEXNORMALS; i++)
{
avelocities[i][0] = (rand() & 255) * 0.01;
avelocities[i][1] = (rand() & 255) * 0.01;
avelocities[i][2] = (rand() & 255) * 0.01;
}
}
for (i = 0; i < NUMVERTEXNORMALS; i++)