]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sat, 2 Apr 2016 23:28:03 +0000 (19:28 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 2 Apr 2016 23:28:03 +0000 (19:28 -0400)
utilities/magick.c

index 003eb20292c5df2500cbe5d8a826ee155b17d688..1e2ac2b4b0ffa55cd2c3fcc60c087f02bc282d3f 100644 (file)
@@ -87,8 +87,7 @@ static int MagickMain(int argc,char **argv)
       MagickCommandSize("magick-script", MagickImageCommand),
       MagickCommandSize("mogrify", MogrifyImageCommand),
       MagickCommandSize("montage", MontageImageCommand),
-      MagickCommandSize("stream", StreamImageCommand),
-      MagickCommandSize("magick", MagickImageCommand)
+      MagickCommandSize("stream", StreamImageCommand)
     };
 
   char
@@ -131,9 +130,12 @@ static int MagickMain(int argc,char **argv)
     if (offset == 0)
       break;
   }
-  i%=(sizeof(MagickCommands)/sizeof(MagickCommands[0]));
-  status=MagickCommandGenesis(image_info,MagickCommands[i].command,argc,argv,
-    (char **) NULL,exception);
+  if (i == (sizeof(MagickCommands)/sizeof(MagickCommands[0])))
+    status=MagickCommandGenesis(image_info,MagickImageCommand,argc,argv,
+      (char **) NULL,exception);
+  else
+    status=MagickCommandGenesis(image_info,MagickCommands[i].command,argc,argv,
+      (char **) NULL,exception);
   image_info=DestroyImageInfo(image_info);
   exception=DestroyExceptionInfo(exception);
   MagickCoreTerminus();