fix for array index use before checking range

This commit is contained in:
Campbell Barton 2013-10-14 07:10:38 +00:00
parent 0cbdac99b8
commit 78de5efec1
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ static void equalize_bezier(float *data, int desired)
dist = ((float)a) * ddist;
/* we're looking for location (distance) 'dist' in the array */
while ((dist >= pdist[nr]) && nr < MAX_BBONE_SUBDIV)
while ((nr < MAX_BBONE_SUBDIV) && (dist >= pdist[nr]))
nr++;
fac1 = pdist[nr] - pdist[nr - 1];