From b4fa5527ff99f4ad0154f1799b64553a2c2f473f Mon Sep 17 00:00:00 2001 From: FutureRave Date: Wed, 9 Feb 2022 00:16:00 +0000 Subject: [PATCH] Nesting --- src/component/command.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/component/command.cpp b/src/component/command.cpp index b7c0940..f5f8ada 100644 --- a/src/component/command.cpp +++ b/src/component/command.cpp @@ -7,6 +7,8 @@ #include "command.hpp" +constexpr auto CMD_MAX_NESTING = 8; + namespace command { std::unordered_map> handlers; @@ -25,6 +27,7 @@ namespace command params::params() : nesting_(game::sv_cmd_args->nesting) { + assert(game::sv_cmd_args->nesting < CMD_MAX_NESTING); } int params::size() const