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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user