From f680e42a4c7b17e9f8b08f74b01094f59d84b9bb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 20 Sep 2017 04:57:48 +1000 Subject: Correct test ifdef in polyfill --- source/blender/blenlib/intern/polyfill2d.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/blenlib/intern/polyfill2d.c b/source/blender/blenlib/intern/polyfill2d.c index 26f8709b16e..018e2f9be5a 100644 --- a/source/blender/blenlib/intern/polyfill2d.c +++ b/source/blender/blenlib/intern/polyfill2d.c @@ -698,12 +698,12 @@ static bool pf_ear_tip_check(PolyFill *pf, PolyIndex *pi_ear_tip) /* check if counting is wrong */ { uint coords_tot_concave_test = 0; - uint i = pf->coords_tot; - while (i--) { - if (coords_sign[indices[i]] != CONVEX) { + PolyIndex *pi_iter = pi_ear_tip; + do { + if (pi_iter->sign != CONVEX) { coords_tot_concave_test += 1; } - } + } while ((pi_iter = pi_iter->next) != pi_ear_tip); BLI_assert(coords_tot_concave_test == pf->coords_tot_concave); } #endif -- cgit v1.2.3