From: Jim Meyering Date: Fri, 14 Mar 1997 04:06:12 +0000 (+0000) Subject: (main): Allow use of 0 (zero) as the margin offset X-Git-Tag: SH-UTILS-1_16a~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f02b837782c988e291cd8ac70ce3f70150d76df4;p=thirdparty%2Fcoreutils.git (main): Allow use of 0 (zero) as the margin offset argument to the -o option. Patch from Gary Anderson. --- diff --git a/src/pr.c b/src/pr.c index b4ddf69fe7..68c12a64c6 100644 --- a/src/pr.c +++ b/src/pr.c @@ -816,7 +816,7 @@ main (int argc, char **argv) { long int tmp_long; if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK - || tmp_long <= 0 || tmp_long > INT_MAX) + || tmp_long < 0 || tmp_long > INT_MAX) error (EXIT_FAILURE, 0, _("`-o MARGIN' invalid line offset: `%s'"), optarg); chars_per_margin = (int) tmp_long;