fold: check -N form properly
This commit is contained in:
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();
|
||||||
|
Reference in New Issue
Block a user