diff options
author | rubidium <rubidium@openttd.org> | 2013-11-23 13:12:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-23 13:12:19 +0000 |
commit | b3e93d65208f74802595b12e682d98a4d534a328 (patch) | |
tree | 992b20c16adccf478fb80f75fd1c0805044e709e /src/network | |
parent | 2e54c8fdfa237f84e8d48b30bf4811ba7ed84327 (diff) | |
download | openttd-b3e93d65208f74802595b12e682d98a4d534a328.tar.xz |
(svn r26057) -Fix: a number of possibly uninitialised variables
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/core/tcp_game.cpp | 2 | ||||
-rw-r--r-- | src/network/network_internal.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 54d222495..d263b28e4 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -26,7 +26,7 @@ * Create a new socket for the game connection. * @param s The socket to connect with. */ -NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) : info(NULL), +NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) : info(NULL), client_id(INVALID_CLIENT_ID), last_frame(_frame_counter), last_frame_server(_frame_counter), last_packet(_realtime_tick) { this->sock = s; diff --git a/src/network/network_internal.h b/src/network/network_internal.h index e46f20792..29d4fafd6 100644 --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -155,9 +155,9 @@ bool IsNetworkCompatibleVersion(const char *version); */ struct CommandPacket : CommandContainer { /** Make sure the pointer is NULL. */ - CommandPacket() : next(NULL) {} + CommandPacket() : next(NULL), company(INVALID_COMPANY), frame(0), my_cmd(false) {} CommandPacket *next; ///< the next command packet (if in queue) - CompanyByte company; ///< company that is executing the command + CompanyID company; ///< company that is executing the command uint32 frame; ///< the frame in which this packet is executed bool my_cmd; ///< did the command originate from "me" }; |