summaryrefslogtreecommitdiff
path: root/src/seq.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-26 02:19:51 +0000
committerJim Meyering <jim@meyering.net>1999-04-26 02:19:51 +0000
commit3baa7fa854482a64019861c9eb8182610edc2c59 (patch)
tree2a584bf395a2570b967e1b82ac930d829611beb1 /src/seq.c
parent0d13ededcee45c4a0aaff5ff21c773fd33e3dfd0 (diff)
downloadcoreutils-3baa7fa854482a64019861c9eb8182610edc2c59.tar.xz
(main): Revert last change.
Instead, loop on `optind < argc' to protect use of argv[optind].
Diffstat (limited to 'src/seq.c')
-rw-r--r--src/seq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/seq.c b/src/seq.c
index 27ebc9df0..613627dd0 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -143,7 +143,7 @@ main (int argc, char **argv)
/* We have to handle negative numbers in the command line but this
conflicts with the command line arguments. So explicitly check first
whether the next argument looks like a negative number. */
- while (1)
+ while (optind < argc)
{
if (argv[optind][0] == '-'
&& ((optc = argv[optind][1]) == decimal_point[0]