Use sizeof(int) instead of 4

This commit is contained in:
Robert Müller 2023-05-03 17:59:36 +02:00
parent 0cb8488565
commit ef48a2fde4

View file

@ -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;
}