mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 04:45:03 +08:00
fixed bug in read() that miscalculated the message length.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user