From 86509802f36552784ad8c3223beced34999a62ef Mon Sep 17 00:00:00 2001 From: Nick Hastings Date: Thu, 6 Apr 2023 18:35:19 -0400 Subject: [PATCH] Initialize more members of ConCommandDesc_t in ctor --- public/tier1/convar.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/tier1/convar.h b/public/tier1/convar.h index bda8f473..217813a6 100644 --- a/public/tier1/convar.h +++ b/public/tier1/convar.h @@ -350,12 +350,14 @@ public: name = pName; description = pHelpString; this->flags = flags; + this->parent = nullptr; this->callback.m_fnCommandCallback = callback; this->callback.m_bUsingCommandCallbackInterface = false; this->callback.m_bUsingOriginalCommandCallback = true; this->callback.m_bUsingParameterlessCallback = false; + this->autocompletion_callback.m_fnCallbackAny = nullptr; } ConCommandDesc_t(const char* pName, ICommandCallback* pCallback, const char* pHelpString = 0, int64 flags = 0) @@ -363,11 +365,14 @@ public: name = pName; description = pHelpString; this->flags = flags; + this->parent = nullptr; this->callback.m_fnCommandCallbackV2 = callback; this->callback.m_bUsingCommandCallbackInterface = false; this->callback.m_bUsingOriginalCommandCallback = false; this->callback.m_bUsingParameterlessCallback = false; + + this->autocompletion_callback.m_fnCallbackAny = nullptr; } ConCommand(const char* pName, ICommandCallback* pCallback, const char* pHelpString = 0, int64 flags = 0) @@ -375,11 +380,14 @@ public: name = pName; description = pHelpString; this->flags = flags; + this->parent = nullptr; this->callback.m_pCommandCallback = pCallback; this->callback.m_bUsingCommandCallbackInterface = true; this->callback.m_bUsingOriginalCommandCallback = false; this->callback.m_bUsingParameterlessCallback = false; + + this->autocompletion_callback.m_fnCallbackAny = nullptr; } ConCommandRef *Register(ConCommandHandle &hndl)