From 2044b62370f3e26037699577824201fb684578a1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 4 Aug 2012 20:17:22 +0000 Subject: resolve some issues with curve resolution calculaction - resolution could become so high that it would wrap around to a negative number, now check for small numbers before doing float division. - resolution was being calculated in some cases when it already met the clamp value - now this is skipped. --- source/blender/editors/mask/mask_add.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mask') diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index c928e90b422..856db013872 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -91,13 +91,14 @@ static int find_nearest_diff_point(const bContext *C, Mask *mask, const float no i++, cur_point++) { float *diff_points; - int tot_diff_point; + unsigned int tot_diff_point; diff_points = BKE_mask_point_segment_diff_with_resolution(spline, cur_point, width, height, &tot_diff_point); if (diff_points) { - int i, tot_feather_point, tot_point; + int i, tot_point; + unsigned int tot_feather_point; float *feather_points = NULL, *points; if (feather) { -- cgit v1.2.3