ByteBuffer: Fixed buffer overrun possibility.
http://forum.mc-server.org/showthread.php?tid=633&pid=5473#pid5473 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1063 0a769ca7-a7f5-676a-18bf-c427514a06d6master
parent
8191ed3b93
commit
95a94c3db8
|
@ -297,7 +297,9 @@ bool cByteBuffer::ReadBool(bool & a_Value)
|
|||
CHECK_THREAD;
|
||||
CheckValid();
|
||||
NEEDBYTES(1);
|
||||
a_Value = (m_Buffer[m_ReadPos++] != 0);
|
||||
char Value = 0;
|
||||
ReadBuf(&Value, 1);
|
||||
a_Value = (Value != 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue