mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Fix CBaseEntity::ScriptGetKeyValue() returning cached string on invalid input
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user