mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 732664 - Use FormatMessageA so that XPCOM stack walker prints error message correctly. r=dbaron
This commit is contained in:
parent
001abedc5d
commit
24ec15b64b
@ -258,19 +258,19 @@ void PrintError(char *prefix)
|
||||
{
|
||||
LPVOID lpMsgBuf;
|
||||
DWORD lastErr = GetLastError();
|
||||
FormatMessage(
|
||||
FormatMessageA(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL,
|
||||
lastErr,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
|
||||
(LPTSTR) &lpMsgBuf,
|
||||
(LPSTR) &lpMsgBuf,
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
fprintf(stderr, "### ERROR: %s: %s",
|
||||
prefix, lpMsgBuf ? lpMsgBuf : "(null)\n");
|
||||
fflush(stderr);
|
||||
LocalFree( lpMsgBuf );
|
||||
LocalFree(lpMsgBuf);
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user