diff options
author | Cedric Borgese <cedric.borgese@gmail.com> | 2005-09-27 13:31:15 +0000 |
---|---|---|
committer | Cedric Borgese <cedric.borgese@gmail.com> | 2005-09-27 13:31:15 +0000 |
commit | 8225942307f8290e5941cdeaff5c7b212f978390 (patch) | |
tree | a60d0efb5eaeec89a002d8a58ee485de190e8615 /src/gui/login.cpp | |
parent | d56c142c43939657df13f3b7246defe8f181306e (diff) | |
download | mana-8225942307f8290e5941cdeaff5c7b212f978390.tar.gz mana-8225942307f8290e5941cdeaff5c7b212f978390.tar.bz2 mana-8225942307f8290e5941cdeaff5c7b212f978390.tar.xz mana-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.cpp | 5 |
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) |