aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
authoreihrul <eihrul>2008-02-24 14:19:47 +0000
committereihrul <eihrul>2008-02-24 14:19:47 +0000
commit3856e3fd15bdc845dce441b52aabbe4c69f8d0cc (patch)
treea7cfe92128a925b0be1be334b56b1e191dd54a07 /unix.c
parent356ff9bc7fa933a7ab7d483756ec308c0eac49ec (diff)
downloadenet-3856e3fd15bdc845dce441b52aabbe4c69f8d0cc.tar.gz
enet-3856e3fd15bdc845dce441b52aabbe4c69f8d0cc.zip
zero out sin_zero
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/unix.c b/unix.c
index e279bfe..132ca1a 100644
--- a/unix.c
+++ b/unix.c
@@ -274,6 +274,8 @@ enet_socket_send (ENetSocket socket,
if (address != NULL)
{
+ memset (& sin, 0, sizeof (struct sockaddr_in));
+
sin.sin_family = AF_INET;
sin.sin_port = ENET_HOST_TO_NET_16 (address -> port);
sin.sin_addr.s_addr = address -> host;