Unverified Commit dc0712ee authored by Marcel Raad's avatar Marcel Raad
Browse files

tests/server/util: fix Windows Unicode build

Always use the ANSI version of FormatMessage as we don't have the
curl_multibyte gear available here.

Closes https://github.com/curl/curl/pull/3758
parent 20b8df10
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ void win32_perror(const char *msg)
  char buf[512];
  DWORD err = SOCKERRNO;

  if(!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
  if(!FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
                     LANG_NEUTRAL, buf, sizeof(buf), NULL))
    msnprintf(buf, sizeof(buf), "Unknown error %lu (%#lx)", err, err);
  if(msg)