From 79c756d292c347f6750a0109d0531bda7361a212 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 2 Apr 2016 19:28:03 -0400 Subject: [PATCH] ... --- utilities/magick.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/utilities/magick.c b/utilities/magick.c index 003eb2029..1e2ac2b4b 100644 --- a/utilities/magick.c +++ b/utilities/magick.c @@ -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(); -- 2.40.0