From 8e99874c4743032b9cd236c84098570e4476657a Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 4 May 2008 18:52:29 -0500 Subject: Fluffier error message. --- lib/args.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/args.c') diff --git a/lib/args.c b/lib/args.c index 225e0c0d..808125fd 100644 --- a/lib/args.c +++ b/lib/args.c @@ -152,6 +152,7 @@ void get_optflags(void) struct getoptflagstate gof; long *nextarg = (long *)&this; char *options = toys.which->options; + char *letters[]={"s",""}; if (CFG_HELP) toys.exithelp++; // Allocate memory for optargs @@ -332,9 +333,11 @@ notflag: } // Sanity check - if (toys.optcmaxargs) - error_exit("Max %d argument%s", maxargs, maxargs ? "s" : ""); + error_exit("Max %d argument%s", maxargs, letters[!(maxargs-1)]); if (CFG_HELP) toys.exithelp = 0; } -- cgit v1.2.3