From: Cristy Date: Sun, 3 Apr 2016 19:04:12 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.1-0~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff69ad37d27f8245ddf71da0b090e1bda0cfaa71;p=imagemagick ... --- diff --git a/utilities/magick.c b/utilities/magick.c index f4039bdd8..e9bceb855 100644 --- a/utilities/magick.c +++ b/utilities/magick.c @@ -119,6 +119,7 @@ static int MagickMain(int argc,char **argv) if (offset == 0) break; } + i%=(sizeof(MagickCommands)/sizeof(MagickCommands[0])); if ((i == 0) && (argc > 1)) { for (i=1; i < (sizeof(MagickCommands)/sizeof(MagickCommands[0])); i++) @@ -131,8 +132,8 @@ static int MagickMain(int argc,char **argv) break; } } + i%=(sizeof(MagickCommands)/sizeof(MagickCommands[0])); } - i%=(sizeof(MagickCommands)/sizeof(MagickCommands[0])); status=MagickCommandGenesis(image_info,MagickCommands[i].command,argc,argv, (char **) NULL,exception); image_info=DestroyImageInfo(image_info);