From 076b2aaa95d7f1f53b8bd5a7a35d8a00221ec852 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 22 Jun 2015 14:11:28 -0400 Subject: [PATCH] CLI2: Fix bug where a second terminator (--) was stripped --- src/CLI2.cpp | 3 ++- src/Context.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index c26292725..fe28203cc 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -363,7 +363,8 @@ void CLI2::handleTerminator () std::vector reconstructed; for (auto& a : _args) { - if (a._lextype == Lexer::Type::separator) + if (a._lextype == Lexer::Type::separator && + ! terminated) { terminated = true; changes = true; diff --git a/src/Context.cpp b/src/Context.cpp index 544678e39..1d972b6cd 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -230,7 +230,6 @@ int Context::initialize (int argc, const char** argv) cli2.add (argv[i]); cli2.analyze (); - cli.initialize (argc, argv); cli.analyze (true, true);