diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-05 00:17:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-05 00:17:22 +0400 |
commit | 2044b62370f3e26037699577824201fb684578a1 (patch) | |
tree | 013fe43267a73cec6ea2ffe0a340186ce66c7c7a /source/blender/editors/mask/mask_add.c | |
parent | 3d204744147c136a2d57ca3ba52e424b50ea48c2 (diff) |
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.
Diffstat (limited to 'source/blender/editors/mask/mask_add.c')
-rw-r--r-- | source/blender/editors/mask/mask_add.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |