diff options
author | Eric Andersen | 2004-02-04 11:01:19 +0000 |
---|---|---|
committer | Eric Andersen | 2004-02-04 11:01:19 +0000 |
commit | c71c18957d9f990d7373ab39d84e9156dcc7391d (patch) | |
tree | 04a4c2fe08bfb6f953e9b3ec784ff3f9e791f70d | |
parent | c06f568ddaaa65a05080234ec205593e2424dc45 (diff) | |
download | busybox-c71c18957d9f990d7373ab39d84e9156dcc7391d.zip busybox-c71c18957d9f990d7373ab39d84e9156dcc7391d.tar.gz |
Jean Wolter writes:
Hello,
when calling seq with
seq 1 1
it generates an "endless" list of numbers until the counter wraps and
reaches 1 again. The follwoing small patch should introduce the
expected behavior (output of 1 and termination):
regards,
Jean
-rw-r--r-- | coreutils/seq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/seq.c b/coreutils/seq.c index 8401a6d..8a2a80c 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c @@ -36,7 +36,7 @@ extern int seq_main(int argc, char **argv) } last = atof(argv[argc - 1]); - for (i = first; ((first < last) ? (i <= last): (i >= last));i += increment) { + for (i = first; ((first <= last) ? (i <= last): (i >= last));i += increment) { printf("%g\n", i); } |