summaryrefslogtreecommitdiff
path: root/src/gui/login.cpp
diff options
context:
space:
mode:
authorCedric Borgese <cedric.borgese@gmail.com>2005-09-27 13:31:15 +0000
committerCedric Borgese <cedric.borgese@gmail.com>2005-09-27 13:31:15 +0000
commit8225942307f8290e5941cdeaff5c7b212f978390 (patch)
treea60d0efb5eaeec89a002d8a58ee485de190e8615 /src/gui/login.cpp
parentd56c142c43939657df13f3b7246defe8f181306e (diff)
downloadmana-client-8225942307f8290e5941cdeaff5c7b212f978390.tar.gz
mana-client-8225942307f8290e5941cdeaff5c7b212f978390.tar.bz2
mana-client-8225942307f8290e5941cdeaff5c7b212f978390.tar.xz
mana-client-8225942307f8290e5941cdeaff5c7b212f978390.zip
Dont crash if there is an unknown error at login.
Remove a bug that do x86_64 arch fail to connect to server : long is 8 bytes on that arch, use int for 4 bytes integer.
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r--src/gui/login.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index 83a20f8b..b4d431d2 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -346,6 +346,11 @@ int attemptLogin(const std::string& user, const std::string& pass)
// Receive reply
MessageIn msg = get_next_message();
+ if (state == ERROR_STATE)
+ {
+ close_session();
+ return LOGIN_UNKNOWN_ERROR;
+ }
// Login ok
if (msg.getId() == 0x0069)