mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-28 04:36:41 +00:00
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 <oliver@schinagl.nl>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user