]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 6 May 2010 14:07:32 +0000 (14:07 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 6 May 2010 14:07:32 +0000 (14:07 +0000)
magick/utility.c

index e6a128ab63a117ad6ceee0bfbb198469a0b02ebd..8e406d36d27d692ec120a8b91ca726956cdfc5fc 100644 (file)
@@ -794,6 +794,7 @@ MagickExport MagickBooleanType ExpandFilenames(int *number_arguments,
             for (j=0; j < (long) number_files; j++)
               filelist[j]=filelist[j+1];
           }
+        count--;
       }
     if (filelist == (char **) NULL)
       continue;
@@ -816,6 +817,27 @@ MagickExport MagickBooleanType ExpandFilenames(int *number_arguments,
       return(MagickFalse);
     for (j=0; j < (long) number_files; j++)
     {
+      option=filelist[j];
+      parameters=ParseMagickOption(MagickCommandOptions,MagickFalse,option);
+      if (parameters > 0)
+        {
+          long
+            k;
+
+          /*
+            Do not expand command option parameters.
+          */
+          vector[count++]=ConstantString(option);
+          for (k=0; k < parameters; k++)
+          {
+            j++;
+            if (j == (long) number_files)
+              break;
+            option=filelist[j];
+            vector[count++]=ConstantString(option);
+          }
+          continue;
+        }
       (void) CopyMagickString(filename,path,MaxTextExtent);
       if (*path != '\0')
         (void) ConcatenateMagickString(filename,DirectorySeparator,