From: anthony Date: Tue, 11 May 2010 08:01:43 +0000 (+0000) Subject: Add ';' as a geometry string terminator X-Git-Tag: 7.0.1-0~9496 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8017c1ed87944a948e652ee105ce5cdd7ef7426b;p=imagemagick Add ';' as a geometry string terminator --- diff --git a/magick/geometry.c b/magick/geometry.c index 7c1175651..6498fe339 100644 --- a/magick/geometry.c +++ b/magick/geometry.c @@ -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.