mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Use delete[] for m_pSwitchers
This commit is contained in:
parent
146d1d0173
commit
d4dd3e6969
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue