1.1 --- a/bitblt.c Tue Jan 01 10:16:50 2002 +0000 1.2 +++ b/bitblt.c Tue Jan 01 10:18:33 2002 +0000 1.3 @@ -50,7 +50,8 @@ 1.4 boolean get_pixel (Bitmap *bitmap, Point coord) 1.5 { 1.6 u8 *p; 1.7 - if ((coord.x >= bitmap->width) || (coord.y >= bitmap->height)) 1.8 + if ((coord.x < 0) || (coord.y < 0) || 1.9 + (coord.x >= bitmap->width) || (coord.y >= bitmap->height)) 1.10 return (0); 1.11 p = bitmap->bits + coord.y * bitmap->rowbytes + coord.x / 8; 1.12 return ((*p & pixel_mask (coord.x & 7)) != 0); 1.13 @@ -59,7 +60,8 @@ 1.14 void set_pixel (Bitmap *bitmap, Point coord, boolean value) 1.15 { 1.16 u8 *p; 1.17 - if ((coord.x >= bitmap->width) || (coord.y >= bitmap->height)) 1.18 + if ((coord.x < 0) || (coord.y < 0) || 1.19 + (coord.x >= bitmap->width) || (coord.y >= bitmap->height)) 1.20 return; 1.21 p = bitmap->bits + coord.y * bitmap->rowbytes + coord.x / 8; 1.22 if (value) 1.23 @@ -77,7 +79,6 @@ 1.24 int tfn) 1.25 { 1.26 Point src_point, dest_point; 1.27 - boolean src_pixel, dest_pixel; 1.28 1.29 if (! dest_bitmap) 1.30 {