Fix clamping of y.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14431 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2002-09-12 00:29:54 +00:00
parent d460fca45d
commit c25fac7c8c
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2002-09-12 02:29 Alexander Malmberg <alexander@malmberg.org>
* Source/art/image.m (_image_get_color_rgb_8,
_image_get_color_rgb_cmyk_gray): Fix clamping of y.
2002-09-10 22:11 Alexander Malmberg <alexander@malmberg.org>
* Headers/x11/XWindowBuffer.h: Add more documentation.

View file

@ -115,7 +115,7 @@ static void _image_get_color_rgb_8(image_info_t *ii, render_run_t *ri,
if (x < 0) x = 0;
if (y < 0) y = 0;
if (x >= ii->width) x = ii->width - 1;
if (x >= ii->height) y = ii->height - 1;
if (y >= ii->height) y = ii->height - 1;
ofs = ii->bytes_per_row * y + x * ii->bits_per_pixel / 8;
if (ii->is_planar)
@ -150,7 +150,7 @@ static void _image_get_color_rgb_cmyk_gray(image_info_t *ii, render_run_t *ri,
if (x < 0) x = 0;
if (y < 0) y = 0;
if (x >= ii->width) x = ii->width - 1;
if (x >= ii->height) y = ii->height - 1;
if (y >= ii->height) y = ii->height - 1;
ofs = y * ii->bytes_per_row;
bit_ofs = x * ii->bits_per_pixel;