Fixed an off-by-one error in cByteBuffer.
Could have caused random protocol errors and maybe even crashes.master
parent
f027b71a31
commit
3963a72046
|
@ -818,7 +818,7 @@ void cByteBuffer::AdvanceReadPos(int a_Count)
|
|||
CHECK_THREAD;
|
||||
CheckValid();
|
||||
m_ReadPos += a_Count;
|
||||
if (m_ReadPos > m_BufferSize)
|
||||
if (m_ReadPos >= m_BufferSize)
|
||||
{
|
||||
m_ReadPos -= m_BufferSize;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue