Skip to content

Commit

Permalink
fix: use of uninitialized value in command_option copy ctor (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
rept1d authored Dec 19, 2023
1 parent 8ac8168 commit ccc7133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dpp/slashcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ command_option_choice &command_option_choice::fill_from_json_impl(nlohmann::json
}

command_option::command_option(command_option_type t, const std::string &n, const std::string &d, bool r) :
type(t), name(n), description(d), required(r), autocomplete(false)
type(t), name(n), description(d), required(r), focused(false), autocomplete(false)
{
if (std::any_of(n.begin(), n.end(), [](unsigned char c){ return std::isupper(c); })) {
throw dpp::logic_exception(err_command_has_caps, "Command options can not contain capital letters in the name of the option.");
Expand Down

0 comments on commit ccc7133

Please sign in to comment.