diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-12-05 16:15:00 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-12-05 16:15:00 +0000 |
commit | 5e695dfaa659614d76e4215619625aa74134400f (patch) | |
tree | aa2a0c9ff7ed522452f0cbb2256aabd1d8a0c7ef | |
parent | fd9af90faa9348f42666ebb04ccea2d5911e7d54 (diff) | |
download | mana-client-5e695dfaa659614d76e4215619625aa74134400f.tar.gz mana-client-5e695dfaa659614d76e4215619625aa74134400f.tar.bz2 mana-client-5e695dfaa659614d76e4215619625aa74134400f.tar.xz mana-client-5e695dfaa659614d76e4215619625aa74134400f.zip |
Avoid crashing on trying to log the name of a non-existing character.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/gui/char_server.cpp | 8 |
2 files changed, 12 insertions, 4 deletions
@@ -1,7 +1,11 @@ +2005-12-05 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/gui/char_server.cpp: Avoid crashing on trying to log the name + of a non-existing character. + 2005-11-13 Eugenio Favalli <elvenprogrammer@gmail.com> - * The Mana World.dev, src/gui/char_server.cpp: Updated Dev-Cpp project - file, removed a crashing log. + * The Mana World.dev: Updated Dev-Cpp project file. 2005-11-13 Bjørn Lindeijer <bjorn@lindeijer.nl> diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp index 7a9090cd..202c3e29 100644 --- a/src/gui/char_server.cpp +++ b/src/gui/char_server.cpp @@ -224,8 +224,12 @@ void ServerSelectDialog::selectServer(int index) state = CHAR_SELECT_STATE; - logger->log("CharServer: Player: %s (Packet ID: %x, Length: %d)", - char_info[0]->name.c_str(), msg.getId(), msg.getLength()); + if (n_character > 0) + { + logger->log("CharServer: Player: %s (Packet ID: %x, Length: %d)", + char_info[0]->name.c_str(), msg.getId(), + msg.getLength()); + } skip(msg.getLength()); } |