From 2ae795fd61b85f9a8b5bc07a74769ea18b4995d3 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Wed, 15 Feb 2023 13:36:09 -0600 Subject: [PATCH] [Crash] Crash fix where invalid input to #heromodel would crash zone (#2937) --- zone/gm_commands/heromodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/gm_commands/heromodel.cpp b/zone/gm_commands/heromodel.cpp index 45b9048c1..9cd3c4478 100755 --- a/zone/gm_commands/heromodel.cpp +++ b/zone/gm_commands/heromodel.cpp @@ -21,7 +21,7 @@ void command_heromodel(Client *c, const Seperator *sep) t = c->GetTarget(); } - auto hero_forge_model = std::stoul(sep->arg[1]); + auto hero_forge_model = Strings::IsNumber(sep->arg[1]) ? std::stoul(sep->arg[1]) : 0; if (arguments > 1) { auto slot = static_cast(std::stoul(sep->arg[2]));