Fixed an option processing bug

This commit is contained in:
Seth Hall 2020-10-08 16:11:25 -04:00
parent 2bdc56dfcd
commit 97f7bf784b

View file

@ -200,6 +200,8 @@ Options parse_cmdline(int argc, char** argv)
zeek_args.emplace_back(argv[i]);
}
if ( i < argc )
{
// If a script is invoked with Zeek as the interpreter, the arguments provided
// directly in the interpreter line of the script won't be broken apart in the
// argv on Linux so we split it up here.
@ -215,8 +217,6 @@ Options parse_cmdline(int argc, char** argv)
}
}
if ( i < argc )
{
// There is an additional increment here to skip over the "--" if it was found.
if ( endsWith(argv[i], "--") )
++i;