From: Dirk Lemstra Date: Sat, 3 Mar 2018 22:01:18 +0000 (+0100) Subject: Fixed incorrect cast to channel. X-Git-Tag: 7.0.7-25~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da13167dfd5006103dd715ca1e57825dd17bb164;p=imagemagick Fixed incorrect cast to channel. --- diff --git a/MagickCore/morphology.c b/MagickCore/morphology.c index f2c721166..12b404ef9 100644 --- a/MagickCore/morphology.c +++ b/MagickCore/morphology.c @@ -3326,6 +3326,9 @@ static ssize_t MorphologyPrimitiveDirect(Image *image, double pixel; + PixelChannel + channel; + PixelTrait traits; @@ -3341,7 +3344,8 @@ static ssize_t MorphologyPrimitiveDirect(Image *image, ssize_t v; - traits=GetPixelChannelTraits(image,(PixelChannel) i); + channel=GetPixelChannelChannel(image,i); + traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if (((traits & CopyPixelTrait) != 0) || @@ -3487,6 +3491,9 @@ static ssize_t MorphologyPrimitiveDirect(Image *image, double pixel; + PixelChannel + channel; + PixelTrait traits; @@ -3502,7 +3509,8 @@ static ssize_t MorphologyPrimitiveDirect(Image *image, ssize_t v; - traits=GetPixelChannelTraits(image,(PixelChannel) i); + channel=GetPixelChannelChannel(image,i); + traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if (((traits & CopyPixelTrait) != 0) ||