From f82d012e96cf90556a213bf6058de43dc0a9ae7f Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Sun, 5 Sep 2010 17:34:20 +0200 Subject: 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 --- src/net/tmwa/charserverhandler.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/net/tmwa/charserverhandler.cpp') 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; -- cgit v1.2.3-60-g2f50