sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 863f9c1adc9fc983fa24aa7209aca52534e2444b
parent 9b762894a7c29b88d229142b5805d1aa01a1cc9b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue May 19 23:43:58 +0200

fold: check -N form properly

Diffstat:
fold.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fold.c b/fold.c @@ -85,7 +85,8 @@ main(int argc, char *argv[]) width = estrtonum(EARGF(usage()), 1, MIN(LLONG_MAX, SIZE_MAX)); break; ARGNUM: - width = estrtonum(argv[0], 1, MIN(LLONG_MAX, SIZE_MAX)); + if (!(width = ARGNUMF())) + eprintf("illegal width value, too small\n"); break; default: usage();