mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
engine: common: net_ws: fix uninitialized family in IPSocket
This commit is contained in:
parent
cbe3e608b6
commit
e97310c441
@ -1674,12 +1674,10 @@ static int NET_IPSocket( const char *net_iface, int port, int family )
|
|||||||
int err, net_socket;
|
int err, net_socket;
|
||||||
uint optval = 1;
|
uint optval = 1;
|
||||||
dword _true = 1;
|
dword _true = 1;
|
||||||
int pfamily;
|
int pfamily = PF_INET;
|
||||||
|
|
||||||
if( family == AF_INET6 )
|
if( family == AF_INET6 )
|
||||||
pfamily = PF_INET6;
|
pfamily = PF_INET6;
|
||||||
else if( family == AF_INET )
|
|
||||||
pfamily = PF_INET;
|
|
||||||
|
|
||||||
if( NET_IsSocketError(( net_socket = socket( pfamily, SOCK_DGRAM, IPPROTO_UDP ))))
|
if( NET_IsSocketError(( net_socket = socket( pfamily, SOCK_DGRAM, IPPROTO_UDP ))))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user