diff --git a/ChangeLog b/ChangeLog index 9a6a0a6..ef3095b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-09-12 02:29 Alexander Malmberg + + * 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 * Headers/x11/XWindowBuffer.h: Add more documentation. diff --git a/Source/art/image.m b/Source/art/image.m index 23b70e5..0aa0e54 100644 --- a/Source/art/image.m +++ b/Source/art/image.m @@ -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;