summaryrefslogtreecommitdiff
path: root/src/seq.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-04-08 04:37:45 +0000
committerJim Meyering <jim@meyering.net>1996-04-08 04:37:45 +0000
commit39c92b4dc4dd9719a9d8afaffcfcf18ff2d47cca (patch)
treef5b7a7015247d69638f3d417bef1a2c4ef50953b /src/seq.c
parentc74a04a26f27f0341bd764393b716d6670706b82 (diff)
downloadcoreutils-39c92b4dc4dd9719a9d8afaffcfcf18ff2d47cca.tar.xz
(print_numbers): Fix off-by-one error in backwards-counting loop.
Reported by Karl Eichwalder.
Diffstat (limited to 'src/seq.c')
-rw-r--r--src/seq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/seq.c b/src/seq.c
index a0c496acc..e5a909ea6 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -92,10 +92,10 @@ Usage: %s [OPTION]... [START [INCREMENT]] LIMIT\n\
--version output version information and exit\n\
-w, --equal-width equalize width by padding with leading zeroes\n\
\n\
- START, INCREMENT, and LIMIT are interpreted as floating point values.\n\
- INCREMENT should be positive if START is smaller than LIMIT, and negative\n\
- otherwise. When given, the FORMAT argument must contain exactly one of\n\
- the printf-style, floating point output formats %%e, %%f, or %%g.\n\
+START, INCREMENT, and LIMIT are interpreted as floating point values.\n\
+INCREMENT should be positive if START is smaller than LIMIT, and negative\n\
+otherwise. When given, the FORMAT argument must contain exactly one of\n\
+the printf-style, floating point output formats %%e, %%f, or %%g.\n\
"));
}
exit (status);
@@ -403,7 +403,7 @@ the increment must be negative"));
}
printf (format_str, first);
- for (i = 0; /* empty */; i++)
+ for (i = 1; /* empty */; i++)
{
double x = first + i * step;