]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/geometry.c
(no commit message)
[imagemagick] / MagickCore / geometry.c
index 2f8d9c535c6c15fd2bd4553b5efb15c89e10bec9..dccce5cccfc79c152ec610e4c4b60ed08e652913 100644 (file)
@@ -1072,10 +1072,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
   if ((flags & PercentValue) != 0)
     {
       if (((flags & SeparatorValue) == 0) && ((flags & SigmaValue) == 0))
-        {
-          geometry_info->sigma=geometry_info->rho;
-          flags|=SigmaValue;
-        }
+        geometry_info->sigma=geometry_info->rho;
       if (((flags & SeparatorValue) != 0) && ((flags & RhoValue) == 0))
         geometry_info->rho=geometry_info->sigma;
     }
@@ -1447,7 +1444,8 @@ MagickExport MagickStatusType ParsePageGeometry(const Image *image,
     }
   flags=ParseMetaGeometry(geometry,&region_info->x,&region_info->y,
     &region_info->width,&region_info->height);
-  if (((flags & PercentValue) != 0) || ((flags & SeparatorValue) == 0))
+  if ((((flags & WidthValue) != 0) || ((flags & HeightValue) != 0)) &&
+      (((flags & PercentValue) != 0) || ((flags & SeparatorValue) == 0)))
     {
       if ((flags & WidthValue) == 0)
         region_info->width=region_info->height;