Mercurial > hg > openttd
changeset 11564:1fa775b6b68a draft
(svn r15930) -Fix (r15926): MSVC compilation
author | glx <glx@openttd.org> |
---|---|
date | Fri, 03 Apr 2009 12:48:11 +0000 |
parents | e41891f242f8 |
children | cf37aec7c469 |
files | src/network/core/host.cpp src/network/core/host.h |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -79,7 +79,7 @@ if (ip != INADDR_LOOPBACK && ip != INADDR_ANY) { sockaddr_storage address; memset(&address, 0, sizeof(address)); - ((sockaddr_in*)&storage)->sin_addr.s_addr = htonl(ip | ~netmask); + ((sockaddr_in*)&address)->sin_addr.s_addr = htonl(ip | ~netmask); broadcast[index] = NetworkAddress(address, sizeof(sockaddr)); index++; } @@ -137,7 +137,7 @@ sockaddr_storage address; memset(&address, 0, sizeof(address)); /* iiBroadcast is unusable, because it always seems to be set to 255.255.255.255. */ - ((sockaddr_in*)&storage)->sin_addr.s_addr = ifo[j].iiAddress.AddressIn.sin_addr.s_addr | ~ifo[j].iiNetmask.AddressIn.sin_addr.s_addr; + ((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)); }