bind address bug fix

This commit is contained in:
eihrul 2008-10-06 22:46:10 +00:00
parent b846c47521
commit ad60b6d451

2
unix.c
View file

@ -159,6 +159,8 @@ enet_socket_bind (ENetSocket socket, const ENetAddress * address)
memset (& sin, 0, sizeof (struct sockaddr_in)); memset (& sin, 0, sizeof (struct sockaddr_in));
sin.sin_family = AF_INET;
if (address != NULL) if (address != NULL)
{ {
sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_port = ENET_HOST_TO_NET_16 (address -> port);