From 7b1ff70a521ec3db2302efd22db84b3cfb678b0c Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Wed, 11 May 2016 09:13:31 +0200 Subject: [PATCH] nfc-mfultralight: Show help when no arguments are supplied For some reason, 0cece94778 changed the argc count check to only show the help if argc is 0. Obviously, argc is never zero, as the first argument in argv is always the binary itself. Revert that and show usage if there is no arguments supplied to the binary. Signed-off-by: Olliver Schinagl --- utils/nfc-mfultralight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/nfc-mfultralight.c b/utils/nfc-mfultralight.c index 615833f..b676d28 100644 --- a/utils/nfc-mfultralight.c +++ b/utils/nfc-mfultralight.c @@ -332,7 +332,7 @@ main(int argc, const char *argv[]) bool bUID = false; FILE *pfDump; - if (argc == 0) { + if (argc < 2) { print_usage(argv); exit(EXIT_FAILURE); }