Fix Win32ErrorMessage on Unicode build
This commit is contained in:
parent
11d6cb56d0
commit
48811b2edd
1 changed files with 6 additions and 6 deletions
|
@ -261,12 +261,12 @@ string Subprocess::Win32ErrorMessage(DWORD error_code) {
|
||||||
char* message;
|
char* message;
|
||||||
|
|
||||||
// WTF?
|
// WTF?
|
||||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL, error_code, 0,
|
NULL, error_code, 0,
|
||||||
(LPTSTR)&message, // NOT A BUG!
|
(LPSTR)&message, // NOT A BUG!
|
||||||
0, NULL);
|
0, NULL);
|
||||||
|
|
||||||
string result = message;
|
string result = message;
|
||||||
LocalFree(message);
|
LocalFree(message);
|
||||||
|
|
Loading…
Add table
Reference in a new issue