Fix IPv4 address serialization on FreeBSD (hopefully)

master
Lukas Werling 2018-02-18 00:42:17 +01:00
parent 5b21505efd
commit c0375bba72
1 changed files with 1 additions and 1 deletions

View File

@ -595,7 +595,7 @@ StdStrBuf C4NetIO::HostAddress::ToString(int flags) const
}
char buf[INET6_ADDRSTRLEN];
if (getnameinfo(&gen, sizeof(v6), buf, sizeof(buf), nullptr, 0, NI_NUMERICHOST) != 0)
if (getnameinfo(&gen, GetAddrLen(), buf, sizeof(buf), nullptr, 0, NI_NUMERICHOST) != 0)
return StdStrBuf();
return StdStrBuf(buf, true);