From 8e0e42cdab265df8f5046446bd8f5d645db86af0 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:57:52 +0100 Subject: [PATCH] Tier1: add assert in CCommand::Arg() This code path shouldn't be hit. --- r5dev/public/tier1/cmd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/r5dev/public/tier1/cmd.h b/r5dev/public/tier1/cmd.h index 32e55b10..a99a358d 100644 --- a/r5dev/public/tier1/cmd.h +++ b/r5dev/public/tier1/cmd.h @@ -130,6 +130,7 @@ inline const char* CCommand::Arg(int nIndex) const // do the extra check and return an empty string if it's out of range if (nIndex < 0 || nIndex >= m_nArgc) { + Assert(0); return ""; } return m_ppArgv[nIndex];