mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Use ConVar::ChangeStringValue() instead for purging hostnames
Now possible without crashing with the new memalloc singleton.
This commit is contained in:
parent
c7cd6b2971
commit
65cbdb5465
@ -272,7 +272,7 @@ void ConVar::PurgeHostNames(void) const
|
|||||||
{
|
{
|
||||||
if (ConVar* pCVar = g_pCVar->FindVar(pszHostNames[i]))
|
if (ConVar* pCVar = g_pCVar->FindVar(pszHostNames[i]))
|
||||||
{
|
{
|
||||||
pCVar->ChangeStringValueUnsafe("0.0.0.0");
|
pCVar->ChangeStringValue("0.0.0.0", pCVar->m_Value.m_fValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -776,7 +776,7 @@ void ConVar::ChangeStringValue(const char* pszTempVal, float flOldValue)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: changes the ConVar string value (unsafe).
|
// Purpose: changes the ConVar string value (only use if the new string is equal or lower than this->m_iStringLength).
|
||||||
// Input : *pszTempVal - flOldValue
|
// Input : *pszTempVal - flOldValue
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void ConVar::ChangeStringValueUnsafe(const char* pszNewValue)
|
void ConVar::ChangeStringValueUnsafe(const char* pszNewValue)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user