mirror of
git://git.sv.gnu.org/coreutils
synced 2026-06-06 23:59:19 -04:00
(print_numbers): Fix off-by-one error in backwards-counting loop.
Reported by Karl Eichwalder.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user