summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-01 19:44:49 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-01 19:44:49 +0200
commit218dbbd7ce5415fe8c26857f06c5907c7cc6d175 (patch)
tree53f7f6882285fd4add2ec01e9265bd01666472d4
parent98d5d99550b7f4c76da6a7ac2b8a21c8ba6cfa62 (diff)
downloadmv-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.tar.gz
mv-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.tar.bz2
mv-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.tar.xz
mv-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.zip
Fix char slots number calculation.
-rw-r--r--src/net/tmwa/charserverhandler.cpp6
1 files changed, 5 insertions, 1 deletions
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)
{