Assert on concommand hook crash

This commit is contained in:
samisalreadytaken 2022-11-26 20:12:35 +03:00
parent 5e891f85a6
commit 1aff4bb9b9

View File

@ -2742,6 +2742,11 @@ public:
void CScriptConvarAccessor::RegisterCommand( const char *name, HSCRIPT fn, const char *helpString, int flags )
{
#if CLIENT_DLL
// FIXME: This crashes in engine when used as a hook (dispatched from CScriptConCommand::CommandCallback())
Assert( V_stricmp( name, "load" ) != 0 );
#endif
unsigned int hash = Hash(name);
int idx = g_ScriptConCommands.Find(hash);
if ( idx == g_ScriptConCommands.InvalidIndex() )