From da13167dfd5006103dd715ca1e57825dd17bb164 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sat, 3 Mar 2018 23:01:18 +0100 Subject: [PATCH] Fixed incorrect cast to channel. --- MagickCore/morphology.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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) || -- 2.40.0