1
0
Fork 0

Fixed an off-by-one error in cByteBuffer.

Could have caused random protocol errors and maybe even crashes.
This commit is contained in:
madmaxoft 2013-11-29 18:39:40 +01:00
parent f027b71a31
commit 3963a72046
1 changed files with 1 additions and 1 deletions

View File

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