1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-30 13:34:27 +01:00

Fix IPv6Address::to_string on Windows.

This commit is contained in:
Matias Fontanini
2015-04-25 12:20:47 -07:00
parent 93ed4f537e
commit e64e0ce27b

View File

@@ -87,7 +87,7 @@ std::string IPv6Address::to_string() const {
#ifdef WIN32
// mingw on linux somehow doesn't have InetNtop
#ifdef _MSC_VER
if(InetNtopA(AF_INET6, (PVOID)address, buffer, sizeof(buffer)) != 0)
if(InetNtopA(AF_INET6, (PVOID)address, buffer, sizeof(buffer)) == 0)
throw malformed_address();
#else
ULONG sz = sizeof(buffer);