From: henryk@ploetzli.ch Date: Tue, 1 Sep 2009 04:59:52 +0000 (+0000) Subject: Fix argument check for the case of both and not fast X-Git-Tag: v1.0.0~496 X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/0c13c669cf2d73aaa65627689913c97dcf1651e5 Fix argument check for the case of both and not fast --- diff --git a/linux/flasher.c b/linux/flasher.c index beea754e..a8943513 100644 --- a/linux/flasher.c +++ b/linux/flasher.c @@ -120,7 +120,7 @@ int main(int argc, char **argv) { BOOL fastflash = 0, flashboth = 0; UsbCommand c; - if (argc != 3 && ! ((argc == 4 && *argv[3] == 'f') || (argc == 5 && *argv[4] == 'f'))) { + if (argc != 3 && ! ((argc == 4 && (*argv[3] == 'f' || strcmp(argv[1], "both") == 0) ) || (argc == 5 && *argv[4] == 'f'))) { fprintf(stderr,"Usage: %s {bootrom|os|fpga} image.s19 [f]ast\n", argv[0]); fprintf(stderr," %s {both} osimage.s19 fpgaimage.s19 [f]ast\n", argv[0]); exit(EXIT_FAILURE);