(main): Allow use of 0 (zero) as the margin offset
authorJim Meyering <jim@meyering.net>
Fri, 14 Mar 1997 04:06:12 +0000 (04:06 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 14 Mar 1997 04:06:12 +0000 (04:06 +0000)
argument to the -o option.  Patch from Gary Anderson.

src/pr.c

index b4ddf69..68c12a6 100644 (file)
--- 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;