From 2dafb9dd577e49bbbe9572f9529a4abfa2f9b9bc Mon Sep 17 00:00:00 2001 From: glx Date: Fri, 3 Apr 2009 16:22:34 +0000 Subject: (svn r15938) -Fix: broadcast addresses detection was broken for win32 --- src/network/core/host.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/network/core/host.cpp b/src/network/core/host.cpp index 5db3b2e79..88a662208 100644 --- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -137,8 +137,10 @@ static int NetworkFindBroadcastIPsInternal(NetworkAddress *broadcast, int limit) sockaddr_storage address; memset(&address, 0, sizeof(address)); /* iiBroadcast is unusable, because it always seems to be set to 255.255.255.255. */ + memcpy(&address, &ifo[j].iiAddress.Address, sizeof(sockaddr)); ((sockaddr_in*)&address)->sin_addr.s_addr = ifo[j].iiAddress.AddressIn.sin_addr.s_addr | ~ifo[j].iiNetmask.AddressIn.sin_addr.s_addr; broadcast[index] = NetworkAddress(address, sizeof(sockaddr)); + index++; } closesocket(sock); -- cgit v1.2.3-70-g09d2