diff --git a/common/TracySocket.cpp b/common/TracySocket.cpp index 469efa44..dd6867f2 100644 --- a/common/TracySocket.cpp +++ b/common/TracySocket.cpp @@ -437,7 +437,7 @@ IpAddress::~IpAddress() void IpAddress::Set( const struct sockaddr& addr ) { auto ai = (const struct sockaddr_in*)&addr; - inet_ntop( AF_INET, &ai->sin_addr, m_text, 17 ); + getnameinfo( &addr, sizeof( sockaddr_in ), m_text, 64, nullptr, 0, NI_NOFQDN ); m_number = ai->sin_addr.s_addr; } diff --git a/common/TracySocket.hpp b/common/TracySocket.hpp index 44e26635..6e9f66c9 100644 --- a/common/TracySocket.hpp +++ b/common/TracySocket.hpp @@ -103,7 +103,7 @@ public: private: uint32_t m_number; - char m_text[17]; + char m_text[64]; }; class UdpListen