Mercurial > hg > openttd
changeset 11570:fbf8c02a8cba draft
(svn r15938) -Fix: broadcast addresses detection was broken for win32
author | glx <glx@openttd.org> |
---|---|
date | Fri, 03 Apr 2009 16:22:34 +0000 |
parents | ec6f6c09852b |
children | f4dcf759a3be |
files | src/network/core/host.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -137,8 +137,10 @@ 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);