diff options
Diffstat (limited to 'src/network/core/host.cpp')
-rw-r--r-- | src/network/core/host.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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); |