Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/seq.c')
-rw-r--r--coreutils/seq.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/coreutils/seq.c b/coreutils/seq.c
index c0e2d1e06..77a8aba8a 100644
--- a/coreutils/seq.c
+++ b/coreutils/seq.c
@@ -57,8 +57,12 @@ int seq_main(int argc, char **argv)
saved = argv[++n];
if (!saved)
break;
- if (saved[0] != '-')
- break;
+ if (saved[0] != '-') {
+ // break; // "seq -s : -1 1" won't be treated correctly
+ continue;
+ }
+// "seq -s -1 1 9" is not treated correctly, but such usage
+// (delimiter string which looks like negative number) is very unlikely
c = saved[1];
if (c == '.' || (c >= '0' && c <= '9')) {
argv[n] = NULL;