From 2155c00c4444cc7a1b48e18b5df313dc42e47d00 Mon Sep 17 00:00:00 2001 From: crs Date: Sun, 13 May 2001 12:07:32 +0000 Subject: [PATCH] fixed bug in read() that miscalculated the message length. --- CMessageSocket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMessageSocket.cpp b/CMessageSocket.cpp index c89c0db1..97b0d516 100644 --- a/CMessageSocket.cpp +++ b/CMessageSocket.cpp @@ -78,8 +78,8 @@ SInt32 CMessageSocket::read(void* buffer, SInt32 n) // get next message size if (m_size >= 2) { m_msgSize = static_cast( - (static_cast(m_buffer[1]) << 8) + - (static_cast(m_buffer[2]) )); + (static_cast(m_buffer[0]) << 8) + + (static_cast(m_buffer[1]) )); TRACE((" next message size: %d", m_msgSize)); }