summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/BlockingTCPLink.cpp
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-03-14 15:34:29 +0100
committerworktycho <work.tycho@gmail.com>2014-03-14 15:34:29 +0100
commitb8cffe569f8bf6e3379f1c45d9e32a986efac25e (patch)
tree4688783dbca9b7a6f0ef662926d07e4c5edc25d6 /src/OSSupport/BlockingTCPLink.cpp
parentcPlugin:BindConsoleCommand can be called statically. (diff)
parentMerge branch 'master' into warnings (diff)
downloadcuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.gz
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.bz2
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.lz
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.xz
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.zst
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.zip
Diffstat (limited to 'src/OSSupport/BlockingTCPLink.cpp')
-rw-r--r--src/OSSupport/BlockingTCPLink.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/OSSupport/BlockingTCPLink.cpp b/src/OSSupport/BlockingTCPLink.cpp
index e9c00d6d4..07f48b955 100644
--- a/src/OSSupport/BlockingTCPLink.cpp
+++ b/src/OSSupport/BlockingTCPLink.cpp
@@ -70,7 +70,7 @@ bool cBlockingTCPLink::Connect(const char * iAddress, unsigned int iPort)
}
}
- server.sin_addr.s_addr = *((unsigned long *)hp->h_addr);
+ memcpy(&server.sin_addr.s_addr,hp->h_addr, hp->h_length);
server.sin_family = AF_INET;
server.sin_port = htons( (unsigned short)iPort);
if (connect(m_Socket, (struct sockaddr *)&server, sizeof(server)))