From bf4ad1d7174ccc5daab265ee29b03c83aa0e1054 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 27 Jun 2018 11:12:25 +0200 Subject: [PATCH] Fixing error in setting args after parsing (broken test fixed) --- include/CLI/App.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index 15a9fce7..967100c1 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -1365,10 +1365,13 @@ class App { size_t num_left_over = remaining_size(); if(num_left_over > 0) { args = remaining(false); - std::reverse(std::begin(args), std::end(args)); throw ExtrasError(args); } } + + if(parent_ == nullptr) { + args = remaining(false); + } } /// Parse one config param, return false if not found in any subcommand, remove if it is