Browse Source

Only null terminate the first character

pull/1/head
Vincent Milum Jr 8 years ago committed by GitHub
parent
commit
79b47b055a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      node/InetAddress.cpp

2
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);

Loading…
Cancel
Save