summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-10 18:38:21 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-10 18:48:50 +0100
commite2e7f2184f09562753be1a474c2d7e8273b1e83b (patch)
tree08eeff1c5581a9b5531b3cfa44aebb46e62879b0
parentFixed cast between types of different alignment in cSocket (diff)
downloadcuberite-e2e7f2184f09562753be1a474c2d7e8273b1e83b.tar
cuberite-e2e7f2184f09562753be1a474c2d7e8273b1e83b.tar.gz
cuberite-e2e7f2184f09562753be1a474c2d7e8273b1e83b.tar.bz2
cuberite-e2e7f2184f09562753be1a474c2d7e8273b1e83b.tar.lz
cuberite-e2e7f2184f09562753be1a474c2d7e8273b1e83b.tar.xz
cuberite-e2e7f2184f09562753be1a474c2d7e8273b1e83b.tar.zst
cuberite-e2e7f2184f09562753be1a474c2d7e8273b1e83b.zip
-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)))