From 8b8a3aee66e22bdf9314a0e6b7ffd92f84313246 Mon Sep 17 00:00:00 2001 From: cristy Date: Sat, 23 Oct 2010 18:49:46 +0000 Subject: [PATCH] --- magick/fx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/magick/fx.c b/magick/fx.c index 7e465de7e..5c966f215 100644 --- a/magick/fx.c +++ b/magick/fx.c @@ -215,6 +215,10 @@ MagickExport FxInfo *AcquireFxInfo(const Image *image,const char *expression) (void) SubstituteString(&fx_info->expression,"8e-","8**10^-"); (void) SubstituteString(&fx_info->expression,"9e-","9**10^-"); } + /* + Force right-to-left associativity for unary negation. + */ + (void) SubstituteString(&fx_info->expression,"-","-1.0*"); /* Convert complex to simple operators. */ @@ -2302,7 +2306,7 @@ static MagickRealType FxEvaluateSubexpression(FxInfo *fx_info, exception); return(gamma); } - switch ((unsigned char) *expression) + switch (*expression) { case '+': { -- 2.40.0