mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
zero out sin_zero
This commit is contained in:
parent
356ff9bc7f
commit
3856e3fd15
2 changed files with 4 additions and 0 deletions
2
unix.c
2
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;
|
||||
|
|
2
win32.c
2
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;
|
||||
|
|
Loading…
Reference in a new issue