1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-03 14:03:52 +00:00

Merge pull request #24 from nathanhourt/patch-1

Fix #23: Respect fallthrough_ in _valid_subcommand
This commit is contained in:
Henry Schreiner 2017-08-22 20:51:20 -07:00 committed by GitHub
commit f59570328a

View File

@ -857,7 +857,7 @@ class App {
for(const App_p &com : subcommands_) for(const App_p &com : subcommands_)
if(com->check_name(current)) if(com->check_name(current))
return true; return true;
if(parent_ != nullptr) if(parent_ != nullptr && fallthrough_)
return parent_->_valid_subcommand(current); return parent_->_valid_subcommand(current);
else else
return false; return false;