diff --git a/src/engine/shared/packer.cpp b/src/engine/shared/packer.cpp index 77565bdd3..21de58aa8 100644 --- a/src/engine/shared/packer.cpp +++ b/src/engine/shared/packer.cpp @@ -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; }