Skip to content

Commit

Permalink
Fix unitialised variable occassionally being used
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno- committed Jan 24, 2015
1 parent a555e2d commit 0ea843b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/game.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 0ea843b

Please sign in to comment.