fold: check -N form properly

This commit is contained in:
Hiltjo Posthuma 2015-05-19 23:43:58 +02:00 committed by sin
parent bc9205cab5
commit fbd128b564

3
fold.c
View File

@ -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();