mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 14:29:05 -07:00
bind address bug fix
This commit is contained in:
parent
b846c47521
commit
ad60b6d451
1 changed files with 2 additions and 0 deletions
2
unix.c
2
unix.c
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue