diff --git a/include/CLI/StringTools.hpp b/include/CLI/StringTools.hpp index 14fd1aee1..3113f6fc8 100644 --- a/include/CLI/StringTools.hpp +++ b/include/CLI/StringTools.hpp @@ -141,15 +141,15 @@ CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const std::vector bool valid_first_char(T c) { - return ((c != '-') && (static_cast(c) > 33)); // space and '!' not allowed + return ((c != '-') && (static_cast(c) > 33)); // space and '!' not allowed } /// Verify following characters of an option template bool valid_later_char(T c) { // = and : are value separators, { has special meaning for option defaults, - // and control codes other than tab would just be annoying to deal with in many places allowing space here has too much potential for - // inadvertent entry errors and bugs - return ((c != '=') && (c != ':') && (c != '{') && ((static_cast(c) > 32)||c=='\t')); + // and control codes other than tab would just be annoying to deal with in many places allowing space here has too + // much potential for inadvertent entry errors and bugs + return ((c != '=') && (c != ':') && (c != '{') && ((static_cast(c) > 32) || c == '\t')); } /// Verify an option/subcommand name diff --git a/include/CLI/impl/App_inl.hpp b/include/CLI/impl/App_inl.hpp index 7251a5e49..d2e0c1288 100644 --- a/include/CLI/impl/App_inl.hpp +++ b/include/CLI/impl/App_inl.hpp @@ -371,7 +371,8 @@ CLI11_INLINE bool App::remove_option(Option *opt) { CLI11_INLINE App *App::add_subcommand(std::string subcommand_name, std::string subcommand_description) { if(!subcommand_name.empty() && !detail::valid_name_string(subcommand_name)) { if(!detail::valid_first_char(subcommand_name[0])) { - throw IncorrectConstruction("Subcommand name starts with invalid character, '!' and '-' and control characters"); + throw IncorrectConstruction( + "Subcommand name starts with invalid character, '!' and '-' and control characters"); } for(auto c : subcommand_name) { if(!detail::valid_later_char(c)) { diff --git a/tests/fuzzFail/fuzz_app_file_fail9 b/tests/fuzzFail/fuzz_app_file_fail9 index 1c8303c41..dc0d66e20 100644 --- a/tests/fuzzFail/fuzz_app_file_fail9 +++ b/tests/fuzzFail/fuzz_app_file_fail9 @@ -1 +1 @@ -=oÿÿÿÿÿÿÿÿÿÿp--2vÿÿt ' Í-è- \ No newline at end of file +=oÿÿÿÿÿÿÿÿÿÿp--2vÿÿt ' Í-è-