diff options
author | rubidium <rubidium@openttd.org> | 2009-04-02 23:03:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-02 23:03:18 +0000 |
commit | beef5da970ba9571aa5673b53cad5edb8b065a2b (patch) | |
tree | c48bb41c564431e5f78a962caee1ffb3a41980f9 /src/network/core | |
parent | c5160c7c8e80b1b64bf474ec1d2a54c2bcef690b (diff) | |
download | openttd-beef5da970ba9571aa5673b53cad5edb8b065a2b.tar.xz |
(svn r15918) -Fix (r15917): comparing IPs sometimes failed due to 'random' data (as spotted by SpComb)
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/udp.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index 31ae8a446..110cec2f2 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -101,6 +101,8 @@ void NetworkUDPSocketHandler::SendPacket(Packet *p, NetworkAddress *recv) void NetworkUDPSocketHandler::ReceivePackets() { struct sockaddr_storage client_addr; + memset(&client_addr, 0, sizeof(client_addr)); + socklen_t client_len; int nbytes; Packet p(this); |