1
0

Attempted a fix for cSocket's Bind() call on MacOS-based systems (initializing the whole sockaddr_in structure with zeroes first)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@446 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-04-03 13:37:00 +00:00
parent d975e5bf04
commit 00ea7d12c1

View File

@ -211,6 +211,7 @@ unsigned long cSocket::INTERNET_ADDRESS_LOCALHOST(void)
int cSocket::Bind(SockAddr_In& a_Address) int cSocket::Bind(SockAddr_In& a_Address)
{ {
sockaddr_in local; sockaddr_in local;
memset(&local, 0, sizeof(local));
local.sin_family = a_Address.Family; local.sin_family = a_Address.Family;
local.sin_addr.s_addr = a_Address.Address; local.sin_addr.s_addr = a_Address.Address;