From adb32fb42211397e8aed62ea51fd35f8d23e8bd5 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sat, 8 Aug 2020 17:22:50 +0000 Subject: [PATCH] Use Microsoft magic to "ignore regular line breaks in the message definition text." of socket error strings on Windows: strips the embedded line-feeds from the socket error description. --- src/xpdev/sockwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xpdev/sockwrap.c b/src/xpdev/sockwrap.c index 16f020c8c4..228851b872 100644 --- a/src/xpdev/sockwrap.c +++ b/src/xpdev/sockwrap.c @@ -506,7 +506,7 @@ DLLEXPORT const char* socket_strerror(int error_number) { static char msg[256]; - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, // dwFlags + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, // dwFlags NULL, // lpSource error_number, // dwMessageId MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // dwLanguageId -- GitLab