aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/args.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/args.c b/lib/args.c
index c9ade1e9..95643c3e 100644
--- a/lib/args.c
+++ b/lib/args.c
@@ -296,8 +296,10 @@ notflag:
}
// Sanity check
- if (optarg<minargs) error_exit("Need %d arguments", minargs);
- if (optarg>maxargs) error_exit("Max %d arguments", maxargs);
+ if (optarg<minargs)
+ error_exit("Need %d argument%s", minargs, minargs ? "s" : "");
+ if (optarg>maxargs)
+ error_exit("Max %d argument%s", maxargs, maxargs ? "s" : "");
}
// Loop through files listed on the command line