[BusyBox-cvs] busybox/coreutils seq.c,1.1,1.2
Erik Andersen
andersen at busybox.net
Wed Feb 4 11:01:21 UTC 2004
Update of /var/cvs/busybox/coreutils
In directory nail:/tmp/cvs-serv17291/coreutils
Modified Files:
seq.c
Log Message:
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
Index: seq.c
===================================================================
RCS file: /var/cvs/busybox/coreutils/seq.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- seq.c 27 Jan 2004 09:22:20 -0000 1.1
+++ seq.c 4 Feb 2004 11:01:19 -0000 1.2
@@ -36,7 +36,7 @@
}
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);
}
More information about the busybox-cvs
mailing list