app: fix sample-point OOB check in gimp_image_resize[_with_layers]()

This commit is contained in:
Ell 2019-08-10 18:32:45 +03:00
parent c377644ba5
commit d13c6ce3e0
1 changed files with 2 additions and 2 deletions

View File

@ -224,11 +224,11 @@ gimp_image_resize_with_layers (GimpImage *image,
gimp_sample_point_get_position (sample_point, &old_x, &old_y);
new_y = old_y + offset_y;
if ((new_y < 0) || (new_y > new_height))
if ((new_y < 0) || (new_y >= new_height))
remove_sample_point = TRUE;
new_x = old_x + offset_x;
if ((new_x < 0) || (new_x > new_width))
if ((new_x < 0) || (new_x >= new_width))
remove_sample_point = TRUE;
if (remove_sample_point)