Merge pull request #3361 from aws-lumberyard-dev/cgalvan/FixConsoleVarsCrash

Fixed console variables crash.
This commit is contained in:
Chris Galvan
2021-08-20 11:43:29 -05:00
committed by GitHub
+3
View File
@@ -3133,6 +3133,9 @@ char* CXConsole::GetCheatVarAt(uint32 nOffset)
//////////////////////////////////////////////////////////////////////////
size_t CXConsole::GetSortedVars(AZStd::vector<AZStd::string_view>& pszArray, const char* szPrefix)
{
// This method used to insert instead of push_back, so we need to clear first
pszArray.clear();
size_t iPrefixLen = szPrefix ? strlen(szPrefix) : 0;
// variables