mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Use sizeof(int)
instead of 4
This commit is contained in:
parent
0cb8488565
commit
ef48a2fde4
|
@ -128,14 +128,14 @@ int CUnpacker::GetUncompressedInt()
|
|||
if(m_Error)
|
||||
return 0;
|
||||
|
||||
if(m_pCurrent + 4 > m_pEnd)
|
||||
if(m_pCurrent + sizeof(int) > m_pEnd)
|
||||
{
|
||||
m_Error = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int i = *(int *)m_pCurrent;
|
||||
m_pCurrent += 4;
|
||||
m_pCurrent += sizeof(int);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue