Skip to content

Commit

Permalink
Fix CBaseEntity::ScriptGetKeyValue() returning cached string on inval…
Browse files Browse the repository at this point in the history
…id input
  • Loading branch information
samisalreadytaken committed Dec 5, 2023
1 parent a1a6c49 commit 82d3818
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sp/src/game/server/baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10297,8 +10297,9 @@ bool CBaseEntity::ScriptAddOutput( const char *pszOutputName, const char *pszTar
const char *CBaseEntity::ScriptGetKeyValue( const char *pszKeyName )
{
static char szValue[128];
GetKeyValue( pszKeyName, szValue, sizeof(szValue) );
return szValue;
if ( GetKeyValue( pszKeyName, szValue, sizeof(szValue) ) )
return szValue;
return NULL;
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit 82d3818

Please sign in to comment.