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;