Fix handling of -- in parameter parser
This commit is contained in:
parent
01828523e3
commit
c90bdb9862
|
@ -19,7 +19,7 @@ ParametersParser::ParametersParser(ParameterList params,
|
||||||
bool only_pos = desc.flags & ParameterDesc::Flags::SwitchesAsPositional;
|
bool only_pos = desc.flags & ParameterDesc::Flags::SwitchesAsPositional;
|
||||||
for (size_t i = 0; i < params.size(); ++i)
|
for (size_t i = 0; i < params.size(); ++i)
|
||||||
{
|
{
|
||||||
if (params[i] == "--")
|
if (not only_pos and params[i] == "--")
|
||||||
only_pos = true;
|
only_pos = true;
|
||||||
else if (not only_pos and params[i][0] == '-')
|
else if (not only_pos and params[i][0] == '-')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user