1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00

(main): Revert last change.

Instead, loop on `optind < argc' to protect use of argv[optind].
This commit is contained in:
Jim Meyering
1999-04-26 02:19:51 +00:00
parent 0d13ededce
commit 3baa7fa854

View File

@@ -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]