aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/convar.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-10-22 23:09:56 +0100
committerGitHub <noreply@github.com>2022-10-22 23:09:56 +0100
commit4d9f64176b56aa08dfd883f743f6e65d68a2f6f9 (patch)
tree0376d3fbecce0f899354a0a711f3a5b686394a98 /NorthstarDLL/convar.cpp
parentc5520a53bd3b14f72b3b962a7654b941f8cf09e1 (diff)
downloadNorthstarLauncher-4d9f64176b56aa08dfd883f743f6e65d68a2f6f9.tar.gz
NorthstarLauncher-4d9f64176b56aa08dfd883f743f6e65d68a2f6f9.zip
fix typo in ConVar::SetValue( const char* ) (#296)
* fix typo in ConVar::SetValue( const char* ) (except this time dont fuck up on git!!) * readd delete
Diffstat (limited to 'NorthstarDLL/convar.cpp')
-rw-r--r--NorthstarDLL/convar.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/NorthstarDLL/convar.cpp b/NorthstarDLL/convar.cpp
index c8f63922..80f93c64 100644
--- a/NorthstarDLL/convar.cpp
+++ b/NorthstarDLL/convar.cpp
@@ -299,10 +299,7 @@ void ConVar::SetValue(float flValue)
void ConVar::SetValue(const char* pszValue)
{
if (strcmp(this->m_Value.m_pszString, pszValue) == 0)
- {
return;
- }
- this->m_Value.m_pszString = pszValue;
char szTempValue[32] {};
const char* pszNewValue {};
@@ -382,13 +379,7 @@ void ConVar::ChangeStringValue(const char* pszTempVal, float flOldValue)
if (len > m_Value.m_iStringLength)
{
if (m_Value.m_pszString)
- {
- // !TODO: Causes issues in tier0.dll, but doesn't in apex.
- // Not a big issue since we are creating a new string below
- // anyways to prevent buffer overflow if string is longer
- // then the old string.
- // delete[] m_Value.m_pszString;
- }
+ delete[] m_Value.m_pszString;
m_Value.m_pszString = new char[len];
m_Value.m_iStringLength = len;