Fix "seq 1 1".

This commit is contained in:
Rob Landley 2006-03-22 17:11:44 +00:00
parent a35886c862
commit 2324a7c9e5
2 changed files with 3 additions and 2 deletions

View file

@ -29,9 +29,9 @@ int seq_main(int argc, char **argv)
}
/* You should note that this is pos-5.0.91 semantics, -- FK. */
if (first < last ? increment > 0 : increment < 0) {
if (first <= last ? increment > 0 : increment < 0) {
for (i = first;
(first < last) ? (i <= last) : (i >= last);
(first <= last) ? (i <= last) : (i >= last);
i += increment)
{
printf("%g\n", i);