]> granicus.if.org Git - imagemagick/commitdiff
Add ';' as a geometry string terminator
authoranthony <anthony@git.imagemagick.org>
Tue, 11 May 2010 08:01:43 +0000 (08:01 +0000)
committeranthony <anthony@git.imagemagick.org>
Tue, 11 May 2010 08:01:43 +0000 (08:01 +0000)
magick/geometry.c

index 7c1175651107713da9ff7405416b8fb8c024b73f..6498fe339e9035a23d90d570d8509903e270b630 100644 (file)
@@ -794,6 +794,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       case 'X':
       case '/':
       case ':':
+      case ';':
       {
         p++;
         break;
@@ -819,7 +820,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
   if (LocaleNCompare(p,"0x",2) == 0)
     value=(double) strtol(p,&q,10);
   if ((((int) *q) == -41) || (*q == 'x') || (*q == 'X') || (*q == ',') ||
-      (*q == '/') || (*q == ':') || (*q =='\0'))
+      (*q == '/') || (*q == ':') || (*q == ';') || (*q =='\0'))
     {
       /*
         Parse rho.
@@ -837,7 +838,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
     }
   q=p;
   if ((((int) *p) == -41) || (*p == 'x') || (*p == 'X') || (*p == ',') ||
-      (*p == '/') || (*p == ':'))
+      (*p == '/') || (*p == ':') || (*p == ';'))
     {
       /*
         Parse sigma.
@@ -859,12 +860,13 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
     }
   while (isspace((int) ((unsigned char) *p)) != 0)
     p++;
-  if ((*p == '+') || (*p == '-') || (*p == ',') || (*p == '/') || (*p == ':'))
+  if ((*p == '+') || (*p == '-') || (*p == ',') || (*p == '/') ||
+       (*p == ':') || (*p == ';'))
     {
       /*
         Parse xi value.
       */
-      if ((*p == ',') || (*p == '/') || (*p == ':'))
+      if ((*p == ',') || (*p == '/') || (*p == ':') || (*p == ';'))
         p++;
       q=p;
       value=strtod(p,&p);
@@ -878,12 +880,12 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       while (isspace((int) ((unsigned char) *p)) != 0)
         p++;
       if ((*p == '+') || (*p == '-') || (*p == ',') || (*p == '/') ||
-          (*p == ':'))
+          (*p == ':') || (*p == ';'))
         {
           /*
             Parse psi value.
           */
-          if ((*p == ',') || (*p == '/') || (*p == ':'))
+          if ((*p == ',') || (*p == '/') || (*p == ':') || (*p == ';'))
             p++;
           q=p;
           value=strtod(p,&p);
@@ -898,7 +900,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       while (isspace((int) ((unsigned char) *p)) != 0)
         p++;
       if ((*p == '+') || (*p == '-') || (*p == ',') || (*p == '/') ||
-          (*p == ':'))
+          (*p == ':') || (*p == ';'))
         {
           /*
             Parse chi value.