CLI2: Fix bug where a second terminator (--) was stripped

This commit is contained in:
Paul Beckingham 2015-06-22 14:11:28 -04:00
parent 02b91a94fc
commit 076b2aaa95
2 changed files with 2 additions and 2 deletions

View file

@ -363,7 +363,8 @@ void CLI2::handleTerminator ()
std::vector <A2> reconstructed; std::vector <A2> reconstructed;
for (auto& a : _args) for (auto& a : _args)
{ {
if (a._lextype == Lexer::Type::separator) if (a._lextype == Lexer::Type::separator &&
! terminated)
{ {
terminated = true; terminated = true;
changes = true; changes = true;

View file

@ -230,7 +230,6 @@ int Context::initialize (int argc, const char** argv)
cli2.add (argv[i]); cli2.add (argv[i]);
cli2.analyze (); cli2.analyze ();
cli.initialize (argc, argv); cli.initialize (argc, argv);
cli.analyze (true, true); cli.analyze (true, true);