summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-02 23:03:18 +0000
committerrubidium <rubidium@openttd.org>2009-04-02 23:03:18 +0000
commitbeef5da970ba9571aa5673b53cad5edb8b065a2b (patch)
treec48bb41c564431e5f78a962caee1ffb3a41980f9 /src/network/core
parentc5160c7c8e80b1b64bf474ec1d2a54c2bcef690b (diff)
downloadopenttd-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.cpp2
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);