aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--code/qcommon/net_ip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c
index 41918e9..5c66f80 100644
--- a/code/qcommon/net_ip.c
+++ b/code/qcommon/net_ip.c
@@ -550,9 +550,9 @@ void Sys_SendPacket( int length, const void *data, netadr_t to ) {
}
else {
if(addr.ss_family == AF_INET)
- ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) );
- else
- ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) );
+ ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in) );
+ else if(addr.ss_family == AF_INET6)
+ ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in6) );
}
if( ret == SOCKET_ERROR ) {
int err = socketError;