1
0

Fixed cast between types of different alignment in cSocket

This commit is contained in:
Tycho 2014-03-10 10:32:51 -07:00
parent 30353cd228
commit 8665233522

View File

@ -307,7 +307,8 @@ bool cSocket::ConnectIPv4(const AString & a_HostNameOrAddr, unsigned short a_Por
CloseSocket();
return false;
}
addr = *((unsigned long*)hp->h_addr);
// Should be optimised to a single word copy
memcpy(&addr, hp->h_addr, hp->h_length);
}
sockaddr_in server;