summaryrefslogtreecommitdiff
path: root/src/net/eathena/chatrecv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/chatrecv.cpp')
-rw-r--r--src/net/eathena/chatrecv.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp
index 2eb763cdf..854647749 100644
--- a/src/net/eathena/chatrecv.cpp
+++ b/src/net/eathena/chatrecv.cpp
@@ -303,9 +303,13 @@ void ChatRecv::processGmChat2(Net::MessageIn &msg)
void ChatRecv::processWhisper(Net::MessageIn &msg)
{
BLOCK_START("ChatRecv::processWhisper")
- const int chatMsgLength = msg.readInt16("len") - 32;
+ int packetLen = 28;
+ if (msg.getVersion() >= 20091104)
+ packetLen += 4;
+ const int chatMsgLength = msg.readInt16("len") - packetLen;
std::string nick = msg.readString(24, "nick");
- msg.readInt32("admin flag");
+ if (msg.getVersion() >= 20091104)
+ msg.readInt32("admin flag");
if (chatMsgLength <= 0)
{