Fix infinite recursion

Bug introduced in recent commit 1d41b23a.
This commit is contained in:
Kawe Mazidjatari 2023-09-16 13:08:56 +02:00
parent 5bab1bc6af
commit 140270f426

View File

@ -1030,6 +1030,9 @@ void LanguageChanged_f(IConVar* pConVar, const char* pOldString, float flOldValu
{
const char* pNewString = pConVarRef->GetString();
if (strcmp(pOldString, pConVarRef->GetString()) == NULL)
return; // Same language.
if (!Localize_IsLanguageSupported(pNewString))
{
// if new text isn't valid but the old value is, reset the value