summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-10 18:32:51 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-10 18:32:51 +0100
commit8665233522da3454a77c4c40ace03d3a61150023 (patch)
treeaa6c314d72eb553d25f88ac9be11e394bb5732c4 /src
parentFixed MTRand warnings (diff)
downloadcuberite-8665233522da3454a77c4c40ace03d3a61150023.tar
cuberite-8665233522da3454a77c4c40ace03d3a61150023.tar.gz
cuberite-8665233522da3454a77c4c40ace03d3a61150023.tar.bz2
cuberite-8665233522da3454a77c4c40ace03d3a61150023.tar.lz
cuberite-8665233522da3454a77c4c40ace03d3a61150023.tar.xz
cuberite-8665233522da3454a77c4c40ace03d3a61150023.tar.zst
cuberite-8665233522da3454a77c4c40ace03d3a61150023.zip
Diffstat (limited to 'src')
-rw-r--r--src/OSSupport/Socket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/OSSupport/Socket.cpp b/src/OSSupport/Socket.cpp
index 6afaceedf..c29e495c3 100644
--- a/src/OSSupport/Socket.cpp
+++ b/src/OSSupport/Socket.cpp
@@ -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;