Commit 34860a6f83ba844053e21684fd41388fedc25981
1 parent
635eb65a
Fix for broken loop
Showing
1 changed file
with
1 additions
and
1 deletions
include/CLI/App.hpp
| @@ -970,7 +970,7 @@ class App { | @@ -970,7 +970,7 @@ class App { | ||
| 970 | missing()->emplace_back(detail::Classifer::NONE, positional); | 970 | missing()->emplace_back(detail::Classifer::NONE, positional); |
| 971 | 971 | ||
| 972 | if(prefix_command_) { | 972 | if(prefix_command_) { |
| 973 | - for(std::string positional : args) { | 973 | + while(!args.empty()) { |
| 974 | missing()->emplace_back(detail::Classifer::NONE, args.back()); | 974 | missing()->emplace_back(detail::Classifer::NONE, args.back()); |
| 975 | args.pop_back(); | 975 | args.pop_back(); |
| 976 | } | 976 | } |