]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Tue, 24 Apr 2018 00:52:46 +0000 (20:52 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 24 Apr 2018 00:52:46 +0000 (20:52 -0400)
MagickCore/draw.c

index 0063fde9ed0029b44328d673dd4e10ddb9fbed01..38cd16141fe57495d172102e5924b919974dfda0 100644 (file)
@@ -1741,35 +1741,30 @@ static char *GetGroupByURL(const char *primitive,const char *url)
     if (LocaleCompare("pop",token) == 0)
       {
         GetNextToken(q,&q,extent,token);
-        if (LocaleCompare("graphic-context",token) == 0)
-          if (n == 0)
-            {
-              /*
-                End of group by ID.
-              */
-              if (start != (const char *) NULL)
-                length=(size_t) (p-start+1);
-              break;
-            }
+        if ((n == 0) && (start != (const char *) NULL))
+          {
+            /*
+              End of group by ID.
+            */
+            length=(size_t) (p-start+1);
+            break;
+          }
         n--;
       }
     if (LocaleCompare("push",token) == 0)
       {
         GetNextToken(q,&q,extent,token);
-        if (LocaleCompare("graphic-context",token) == 0)
+        n++;
+        if (*q == '"')
           {
-            n++;
-            if (*q == '"')
+            GetNextToken(q,&q,extent,token);
+            if (LocaleCompare(url,token) == 0)
               {
-                GetNextToken(q,&q,extent,token);
-                if (LocaleCompare(url,token) == 0)
-                  {
-                    /*
-                      Start of group by ID.
-                    */
-                    n=0;
-                    start=q;
-                  }
+                /*
+                  Start of group by ID.
+                */
+                n=0;
+                start=q;
               }
           }
       }