From: Cristy Date: Sat, 2 Apr 2016 20:46:48 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/161 X-Git-Tag: 7.0.1-0~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1102a1b05a580bf1f71cbd47b7cad77e4605987;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/161 --- diff --git a/coders/bmp.c b/coders/bmp.c index d559f49d3..a8e9181c6 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -1099,23 +1099,18 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) break; for (x=0; x < ((ssize_t) image->columns-1); x+=2) { - if (IsValidColormapIndex(image,(*p >> 4) & 0x0f,&index,exception) - == MagickFalse) - break; + (void) IsValidColormapIndex(image,(*p >> 4) & 0x0f,&index, + exception); SetPixelIndex(image,index,q); q+=GetPixelChannels(image); - if (IsValidColormapIndex(image,*p & 0x0f,&index,exception) == - MagickFalse) - break; + (void) IsValidColormapIndex(image,*p & 0x0f,&index,exception); SetPixelIndex(image,index,q); q+=GetPixelChannels(image); p++; } if ((image->columns % 2) != 0) { - if (IsValidColormapIndex(image,(*p >> 4) & 0xf,&index,exception) - == MagickFalse) - break; + IsValidColormapIndex(image,(*p >> 4) & 0xf,&index,exception); SetPixelIndex(image,index,q); q+=GetPixelChannels(image); p++; @@ -1152,9 +1147,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) break; for (x=(ssize_t) image->columns; x != 0; --x) { - if (IsValidColormapIndex(image,*p++,&index,exception) == - MagickFalse) - break; + (void) IsValidColormapIndex(image,*p++,&index,exception); SetPixelIndex(image,index,q); q+=GetPixelChannels(image); }