fold: check -N form properly
This commit is contained in:
parent
bc9205cab5
commit
fbd128b564
3
fold.c
3
fold.c
|
@ -85,7 +85,8 @@ main(int argc, char *argv[])
|
||||||
width = estrtonum(EARGF(usage()), 1, MIN(LLONG_MAX, SIZE_MAX));
|
width = estrtonum(EARGF(usage()), 1, MIN(LLONG_MAX, SIZE_MAX));
|
||||||
break;
|
break;
|
||||||
ARGNUM:
|
ARGNUM:
|
||||||
width = estrtonum(argv[0], 1, MIN(LLONG_MAX, SIZE_MAX));
|
if (!(width = ARGNUMF()))
|
||||||
|
eprintf("illegal width value, too small\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user