Use delete[] for m_pSwitchers

This commit is contained in:
Jupeyy 2021-11-06 18:12:07 +01:00
parent 146d1d0173
commit d4dd3e6969

View file

@ -1409,7 +1409,7 @@ void CGameClient::OnNewSnapshot()
int NumSwitchers = clamp(pSwitchStateData->m_NumSwitchers, 0, 255);
if(!Collision()->m_pSwitchers || NumSwitchers != Collision()->m_NumSwitchers)
{
delete Collision()->m_pSwitchers;
delete[] Collision()->m_pSwitchers;
Collision()->m_pSwitchers = new CCollision::SSwitchers[NumSwitchers + 1];
Collision()->m_NumSwitchers = NumSwitchers;
}