ITS#10198 Win32 mdb_strerror - stop passing "ignored" parameter

The M$ docs say the parameter is ignored, but it actually isn't,
and will cause a SEGV if the pointed memory isn't an init'd va_list.
This commit is contained in:
Howard Chu 2024-04-04 07:15:24 +01:00
parent 7077d5e601
commit d3ae7c36e5

View File

@ -1555,7 +1555,7 @@ mdb_strerror(int err)
buf[0] = 0;
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE);
NULL, err, 0, ptr, MSGSIZE, NULL);
return ptr;
#else
if (err < 0)