fold: check form -n aswell, > 0

This commit is contained in:
Hiltjo Posthuma 2015-05-19 21:48:10 +02:00 committed by sin
parent 9304b84c92
commit bc9205cab5

2
fold.c
View File

@ -85,7 +85,7 @@ main(int argc, char *argv[])
width = estrtonum(EARGF(usage()), 1, MIN(LLONG_MAX, SIZE_MAX));
break;
ARGNUM:
width = ARGNUMF();
width = estrtonum(argv[0], 1, MIN(LLONG_MAX, SIZE_MAX));
break;
default:
usage();