mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 03:56:54 +02:00
Only null terminate the first character
This commit is contained in:
parent
8e260bae11
commit
79b47b055a
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue