]> granicus.if.org Git - imagemagick/commitdiff
Fix for special coordinate case.
authordirk <dirk@git.imagemagick.org>
Wed, 2 Dec 2015 12:27:55 +0000 (13:27 +0100)
committerdirk <dirk@git.imagemagick.org>
Wed, 2 Dec 2015 12:27:55 +0000 (13:27 +0100)
MagickCore/geometry.c

index b5b214f378a78b065f2bd95de69b294a973d31cf..a37a2c013e491b01ca1ec814a3004aec4f085e2d 100644 (file)
@@ -818,6 +818,9 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
   double
     value;
 
+  GeometryInfo
+    coordinate;
+
   int
     c;
 
@@ -833,13 +836,17 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
     return(flags);
   if (strlen(geometry) >= (MagickPathExtent-1))
     return(flags);
-  c=sscanf(geometry,"%lf%*[ ,]%lf%*[ ,]%lf%*[ ,]%lf",&geometry_info->rho,
-    &geometry_info->sigma,&geometry_info->xi,&geometry_info->psi);
+  c=sscanf(geometry,"%lf%*[ ,]%lf%*[ ,]%lf%*[ ,]%lf",&coordinate.rho,
+    &coordinate.sigma,&coordinate.xi,&coordinate.psi);
   if (c == 4)
     {
       /*
         Special case: coordinate (e.g. 0,0 255,255).
       */
+      geometry_info->rho=coordinate.rho;
+      geometry_info->sigma=coordinate.sigma;
+      geometry_info->xi=coordinate.xi;
+      geometry_info->psi=coordinate.psi;
       flags|=RhoValue | SigmaValue | XiValue | PsiValue;
       return(flags);
     }