fix for own recent commit checking bounds off-by-one.
[blender.git] / source / blender / blenkernel / intern / implicit.c
index 92ac7b6020757df3ee0ded1f7f5e0d68c5246e59..2de5425a04dea6b2043a25c15df7da901bc6d814 100644 (file)
@@ -1513,7 +1513,7 @@ static void hair_velocity_smoothing(ClothModifierData *clmd, lfVector *lF, lfVec
                i = HAIR_GRID_INDEX(lX[v], gmin, gmax, 0);
                j = HAIR_GRID_INDEX(lX[v], gmin, gmax, 1);
                k = HAIR_GRID_INDEX(lX[v], gmin, gmax, 2);
-               if (i < 0 || j < 0 || k < 0 || i > 10 || j > 10 || k > 10)
+               if (i < 0 || j < 0 || k < 0 || i >= 10 || j >= 10 || k >= 10)
                        continue;
 
                lF[v][0] += smoothfac * (grid[i][j][k].velocity[0] - lV[v][0]);