[Crash] Fix crash in bot command botdyearmor (#2832)

* [Crash] Fix crash in bot command botdyearmor

* Update bot_command.cpp
This commit is contained in:
Chris Miles 2023-02-06 17:24:49 -06:00 committed by GitHub
parent c6eb12ac16
commit 20728c31c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5754,7 +5754,7 @@ void bot_subcommand_bot_dye_armor(Client *c, const Seperator *sep)
return;
}
if (helper_is_help_or_usage(sep->arg[1])) {
if (helper_is_help_or_usage(sep->arg[1]) || !sep->arg[1] || (sep->arg[1] && !Strings::IsNumber(sep->arg[1]))) {
c->Message(
Chat::White,
fmt::format(