From 8225942307f8290e5941cdeaff5c7b212f978390 Mon Sep 17 00:00:00 2001 From: Cedric Borgese Date: Tue, 27 Sep 2005 13:31:15 +0000 Subject: 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. --- src/gui/login.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/login.cpp') 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) -- cgit v1.2.3-70-g09d2