Skip to content

Commit

Permalink
fix asan error
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 committed Nov 20, 2024
1 parent 61d3b2f commit 0e5ca98
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/game/client/components/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,14 @@ void CHud::RenderTextInfo()
{
int NumInTeam = 0;
int NumFrozen = 0;
int LocalTeamID = m_pClient->m_Snap.m_SpecInfo.m_Active == 1 && m_pClient->m_Snap.m_SpecInfo.m_SpectatorId != -1 ?
m_pClient->m_Teams.Team(m_pClient->m_Snap.m_SpecInfo.m_SpectatorId) :
m_pClient->m_Teams.Team(m_pClient->m_Snap.m_LocalClientId);

int LocalTeamID = 0;
if(m_pClient->m_Snap.m_LocalClientId >= 0 && m_pClient->m_Snap.m_SpecInfo.m_SpectatorId >= 0)
{
if(m_pClient->m_Snap.m_SpecInfo.m_Active == 1 && m_pClient->m_Snap.m_SpecInfo.m_SpectatorId != -1)
LocalTeamID = m_pClient->m_Teams.Team(m_pClient->m_Snap.m_SpecInfo.m_SpectatorId);
else
LocalTeamID = m_pClient->m_Teams.Team(m_pClient->m_Snap.m_LocalClientId);
}
for(int i = 0; i < MAX_CLIENTS; i++)
{
if(!m_pClient->m_Snap.m_apPlayerInfos[i])
Expand Down

0 comments on commit 0e5ca98

Please sign in to comment.