From 3856e3fd15bdc845dce441b52aabbe4c69f8d0cc Mon Sep 17 00:00:00 2001 From: eihrul Date: Sun, 24 Feb 2008 14:19:47 +0000 Subject: [PATCH] zero out sin_zero --- unix.c | 2 ++ win32.c | 2 ++ 2 files changed, 4 insertions(+) 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; diff --git a/win32.c b/win32.c index 27e7877..b8b2aa7 100644 --- a/win32.c +++ b/win32.c @@ -225,6 +225,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;