Commit e184d694 by Jim Wilson

(translate_options): For options that take an argument,

don't skip the argument if it doesn't exist.

From-SVN: r7190
parent e32fe224
......@@ -900,6 +900,12 @@ translate_options (argcp, argvp)
else if (! strcmp (p, "Xlinker"))
nskip += 1;
/* Watch out for an option at the end of the command line that
is missing arguments, and avoid skipping past the end of the
command line. */
if (nskip + i > argc)
nskip = argc - i;
while (nskip > 0)
{
newv[newindex++] = argv[i++];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment