diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-01 19:44:49 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-01 19:44:49 +0200 |
commit | 218dbbd7ce5415fe8c26857f06c5907c7cc6d175 (patch) | |
tree | 53f7f6882285fd4add2ec01e9265bd01666472d4 /src/net | |
parent | 98d5d99550b7f4c76da6a7ac2b8a21c8ba6cfa62 (diff) | |
download | manaplus-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.tar.gz manaplus-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.tar.bz2 manaplus-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.tar.xz manaplus-218dbbd7ce5415fe8c26857f06c5907c7cc6d175.zip |
Fix char slots number calculation.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 6 |
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) { |