]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 23 Oct 2010 18:49:46 +0000 (18:49 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 23 Oct 2010 18:49:46 +0000 (18:49 +0000)
magick/fx.c

index 7e465de7ecf65f8ccf43157e4fc74ed173900cb6..5c966f2153124191861ca15d429239af48a48955 100644 (file)
@@ -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 '+':
     {