summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-03-14 04:06:12 +0000
committerJim Meyering <jim@meyering.net>1997-03-14 04:06:12 +0000
commitf02b837782c988e291cd8ac70ce3f70150d76df4 (patch)
tree0b23c3bd63a19f87399486650487c1dab9361d7d /src
parent294ea6ffc2502c0496a60bdf4ee1954cb73ae7dd (diff)
downloadcoreutils-f02b837782c988e291cd8ac70ce3f70150d76df4.tar.xz
(main): Allow use of 0 (zero) as the margin offset
argument to the -o option. Patch from Gary Anderson.
Diffstat (limited to 'src')
-rw-r--r--src/pr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pr.c b/src/pr.c
index b4ddf69fe..68c12a64c 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;