From cd4d3f1915f56278d83ca00d7a970d08970f2fa4 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Thu, 13 Nov 2014 15:23:15 +0100 Subject: [PATCH] Win32: change buffer size for gethotsname in Discover() - 256 byte is the maximum, as per http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527%28v=vs.85%29.aspx --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 695adeec5..6bf72d22c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1559,7 +1559,7 @@ void static Discover(boost::thread_group& threadGroup) #ifdef WIN32 // Get local host IP - char pszHostName[1000] = ""; + char pszHostName[256] = ""; if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR) { vector vaddr;