From: Cristy Date: Fri, 9 Dec 2016 15:55:15 +0000 (-0500) Subject: Return correct offset for negative index for -fx option X-Git-Tag: 7.0.3-10~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb2736070ed1a6842cb83f671372f57c85ec00d4;p=imagemagick Return correct offset for negative index for -fx option --- diff --git a/ChangeLog b/ChangeLog index f75b90662..b9bfba2e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31006). * Enable alpha channel if background color is non-opaque (reference https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31016). + * Return correct offset for negative index for -fx option (reference + https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31019). 2016-12-05 7.0.3-9 Cristy * Release ImageMagick version 7.0.3-9, GIT revision 19139:6fed3f1:20161205. diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 02404bbf6..8188cca86 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -1337,7 +1337,7 @@ static double FxGetSymbol(FxInfo *fx_info,const PixelChannel channel, *q='\0'; alpha=FxEvaluateSubexpression(fx_info,channel,x,y,subexpression, &depth,&beta,exception); - i=(ssize_t) (alpha+0.5); + i=(ssize_t) alpha; p++; } if (*p == '.')