diff options
author | Vincent Milum Jr <git@darkain.com> | 2018-09-15 12:13:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-15 12:13:06 -0700 |
commit | 79b47b055a5ba08e94a6024a183217394416e583 (patch) | |
tree | 8bf91b6e873f0d6c80852d2043e195a6aef2a8fb | |
parent | 8e260bae116f01839899d319e5efb0e6867b99a0 (diff) | |
download | infinitytier-79b47b055a5ba08e94a6024a183217394416e583.tar.gz infinitytier-79b47b055a5ba08e94a6024a183217394416e583.zip |
Only null terminate the first character
-rw-r--r-- | node/InetAddress.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node/InetAddress.cpp b/node/InetAddress.cpp index bc1974c7..2b9158f2 100644 --- a/node/InetAddress.cpp +++ b/node/InetAddress.cpp @@ -139,7 +139,7 @@ char *InetAddress::toString(char buf[64]) const char *InetAddress::toIpString(char buf[64]) const { - memset(buf,0,64); + buf[0] = (char)0; switch(ss_family) { case AF_INET: { inet_ntop(AF_INET, &reinterpret_cast<const struct sockaddr_in *>(this)->sin_addr.s_addr, buf, INET_ADDRSTRLEN); |