aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-01-24 14:22:50 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-01-24 14:54:42 +1000
commit0ea843bbdb9618d9f408c279926c29876915eb10 (patch)
treec571b012a01535be0f86814e786592d1ebf5edc2 /src
parenta555e2d9b0ccee452996381a44677b8bec210036 (diff)
downloadminetest-0ea843bbdb9618d9f408c279926c29876915eb10.tar.gz
minetest-0ea843bbdb9618d9f408c279926c29876915eb10.tar.bz2
minetest-0ea843bbdb9618d9f408c279926c29876915eb10.zip
Fix unitialised variable occassionally being used
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index af744dcbb..f5a19a7e4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2116,6 +2116,9 @@ bool Game::connectToServer(const std::string &playername,
const std::string &password, std::string *address, u16 port,
bool *connect_ok, bool *aborted)
{
+ *connect_ok = false; // Let's not be overly optimistic
+ *aborted = false;
+
showOverlayMessage("Resolving address...", 0, 15);
Address connect_address(0, 0, 0, 0, port);
@@ -2158,14 +2161,12 @@ bool Game::connectToServer(const std::string &playername,
gamedef = client; // Client acts as our GameDef
-
infostream << "Connecting to server at ";
connect_address.print(&infostream);
infostream << std::endl;
client->connect(connect_address);
-
/*
Wait for server to accept connection
*/