From 9738c45edd0d240b307720a695ee2ec2d2e1333b Mon Sep 17 00:00:00 2001 From: AIR Date: Thu, 8 Sep 2022 19:35:16 +0200 Subject: [PATCH] Add searching46dof's IPv6 fix --- Client/src/model/UDPSender.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/model/UDPSender.cpp b/Client/src/model/UDPSender.cpp index 15d5f29..68f0d36 100644 --- a/Client/src/model/UDPSender.cpp +++ b/Client/src/model/UDPSender.cpp @@ -66,7 +66,7 @@ void UDPSender::send_data(double* d) { // Make packet const char* pkt = (char*)d; - sendto(s, pkt, BUFFER_SIZE, 0, (sockaddr*)&dest, sizeof(dest)); + sendto(s, pkt, BUFFER_SIZE, 0, (sockaddr*)&dest, (dest.sin_family == AF_INET6 ? sizeof(dest_IPv6) : sizeof(dest))); };