sbase

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

commit fbd128b56490046de31a2be0349931912a9ba71b
parent bc9205cab514f718cfc2451db796ea0cfd96f9b8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue, 19 May 2015 23:43:58 +0200

fold: check -N form properly

Diffstat:
Mfold.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();