summaryrefslogtreecommitdiff
path: root/node/InetAddress.cpp
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-05-21 19:14:49 -0700
committerGrant Limberg <glimberg@gmail.com>2015-05-21 19:14:49 -0700
commitc430d88bd40d178685ac0a2e648d8c4ea675996c (patch)
treef69f497428fa34c6389173d39c889563dea9506c /node/InetAddress.cpp
parent9a00366b18bc2bdb3ddf4345edcc7a459eb5ed60 (diff)
parentd9006712f6ffc975d97097caf2d2b4264405b32c (diff)
downloadinfinitytier-c430d88bd40d178685ac0a2e648d8c4ea675996c.tar.gz
infinitytier-c430d88bd40d178685ac0a2e648d8c4ea675996c.zip
Merge branch 'adamierymenko-dev' into android-jni
Conflicts: .gitignore
Diffstat (limited to 'node/InetAddress.cpp')
-rw-r--r--node/InetAddress.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/node/InetAddress.cpp b/node/InetAddress.cpp
index 54fc763f..940a58b2 100644
--- a/node/InetAddress.cpp
+++ b/node/InetAddress.cpp
@@ -137,8 +137,7 @@ void InetAddress::set(const void *ipBytes,unsigned int ipLen,unsigned int port)
reinterpret_cast<struct sockaddr_in *>(this)->sin_port = Utils::hton((uint16_t)port);
} else if (ipLen == 16) {
ss_family = AF_INET6;
- (reinterpret_cast<uint64_t *>(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr))[0] = ((const uint64_t *)ipBytes)[0];
- (reinterpret_cast<uint64_t *>(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr))[1] = ((const uint64_t *)ipBytes)[1];
+ memcpy(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr,ipBytes,16);
reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_port = Utils::hton((uint16_t)port);
}
}