[hackers] [sbase] fold: check form -n aswell, > 0 || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Thu, 21 May 2015 16:43:43 +0200 (CEST)

commit bc9205cab514f718cfc2451db796ea0cfd96f9b8
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Tue May 19 21:48:10 2015 +0200

    fold: check form -n aswell, > 0

diff --git a/fold.c b/fold.c
index 69493c0..1d88ed9 100644
--- a/fold.c
+++ b/fold.c
_AT_@ -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();
Received on Thu May 21 2015 - 16:43:43 CEST

This archive was generated by hypermail 2.3.0 : Thu May 21 2015 - 16:48:13 CEST