fixed bug in read() that miscalculated the message length.

This commit is contained in:
crs 2001-05-13 12:07:32 +00:00
parent 900b075e3a
commit 2155c00c44
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ SInt32 CMessageSocket::read(void* buffer, SInt32 n)
// get next message size
if (m_size >= 2) {
m_msgSize = static_cast<SInt32>(
(static_cast<UInt32>(m_buffer[1]) << 8) +
(static_cast<UInt32>(m_buffer[2]) ));
(static_cast<UInt32>(m_buffer[0]) << 8) +
(static_cast<UInt32>(m_buffer[1]) ));
TRACE((" next message size: %d", m_msgSize));
}