From 18668728878ca50827d09c5c5bf92cd65b6eda1a Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 13 Jun 2016 18:45:25 +0500 Subject: [PATCH] Fix access to uninitialized variables. --- cl_dll/entity.cpp | 2 +- dlls/func_break.cpp | 2 +- dlls/soundent.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cl_dll/entity.cpp b/cl_dll/entity.cpp index 0228e70d..8dbdd383 100644 --- a/cl_dll/entity.cpp +++ b/cl_dll/entity.cpp @@ -775,7 +775,7 @@ void DLLEXPORT HUD_TempEntUpdate ( if ( pTemp->flags & (FTENT_COLLIDEALL | FTENT_COLLIDEWORLD) ) { - vec3_t traceNormal; + vec3_t traceNormal( 0.0f, 0.0f, 0.0f ); float traceFraction = 1; if ( pTemp->flags & FTENT_COLLIDEALL ) diff --git a/dlls/func_break.cpp b/dlls/func_break.cpp index ff63ef56..e6ba74f7 100644 --- a/dlls/func_break.cpp +++ b/dlls/func_break.cpp @@ -283,7 +283,7 @@ void CBreakable::MaterialSoundRandom( edict_t *pEdict, Materials soundMaterial, void CBreakable::Precache( void ) { - const char *pGibName; + const char *pGibName = NULL; switch (m_Material) { diff --git a/dlls/soundent.cpp b/dlls/soundent.cpp index c567d7a5..ad5ef337 100644 --- a/dlls/soundent.cpp +++ b/dlls/soundent.cpp @@ -230,7 +230,7 @@ void CSoundEnt :: Initialize ( void ) int i; int iSound; - m_cLastActiveSounds; + m_cLastActiveSounds = 0; m_iFreeSound = 0; m_iActiveSound = SOUNDLIST_EMPTY;