From 218dbbd7ce5415fe8c26857f06c5907c7cc6d175 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 1 Mar 2011 19:44:49 +0200 Subject: Fix char slots number calculation. --- src/net/tmwa/charserverhandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 686b67a0e..a1b7c83b8 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -90,7 +90,11 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg) mCharacters.clear(); // Derive number of characters from message length - const int count = (msg.getLength() - 24) / 106; + int count = (msg.getLength() - 24); + if (version) + count /= 120; + else + count /= 106; for (int i = 0; i < count; ++i) { -- cgit v1.2.3-70-g09d2