diff --git a/source/enet/unix.c b/source/enet/unix.c index e279bfeb..132ca1a2 100755 --- a/source/enet/unix.c +++ b/source/enet/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/source/enet/win32.c b/source/enet/win32.c index 27e78777..b8b2aa72 100755 --- a/source/enet/win32.c +++ b/source/enet/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;