summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2010-09-05 17:34:20 +0200
committerStefan Dombrowski <stefan@uni-bonn.de>2010-09-05 17:34:20 +0200
commitf82d012e96cf90556a213bf6058de43dc0a9ae7f (patch)
tree212bc3ed7a2db8aa157b92bb642a1799cbba4181 /src/net/tmwa
parentc99347bf9108367c02dcbdebadec0b978a750c57 (diff)
downloadmana-f82d012e96cf90556a213bf6058de43dc0a9ae7f.tar.gz
mana-f82d012e96cf90556a213bf6058de43dc0a9ae7f.tar.bz2
mana-f82d012e96cf90556a213bf6058de43dc0a9ae7f.tar.xz
mana-f82d012e96cf90556a213bf6058de43dc0a9ae7f.zip
Fixing ghost characters in charselectdialog
How to reproduce the bug: Switch the login to an account with fewer characters. Then those character slots are not empty, but show characters from the previous account. Reviewed-by: thorbjorn
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/charserverhandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 8711f031..dc9b3108 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -77,6 +77,9 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg)
msg.skip(2); // Length word
msg.skip(20); // Unused
+ delete_all(mCharacters);
+ mCharacters.clear();
+
// Derive number of characters from message length
const int count = (msg.getLength() - 24) / 106;