You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ImageMagick/ImageMagick-5.5.6-mask.patch

28 lines
884 B

--- ImageMagick-5.5.6/coders/xwd.c.mask 2003-01-04 22:55:30.000000000 -0500
+++ ImageMagick-5.5.6/coders/xwd.c 2005-05-26 08:22:43.627646000 -0400
@@ -343,21 +343,21 @@
*/
red_mask=ximage->red_mask;
red_shift=0;
- while ((red_mask & 0x01) == 0)
+ while ((red_mask != 0) && ((red_mask & 0x01) == 0))
{
red_mask>>=1;
red_shift++;
}
green_mask=ximage->green_mask;
green_shift=0;
- while ((green_mask & 0x01) == 0)
+ while ((green_mask != 0) && ((green_mask & 0x01) == 0))
{
green_mask>>=1;
green_shift++;
}
blue_mask=ximage->blue_mask;
blue_shift=0;
- while ((blue_mask & 0x01) == 0)
+ while ((blue_mask != 0) && ((blue_mask & 0x01) == 0))
{
blue_mask>>=1;
blue_shift++;