diff options
author | Wei-Yin Chen (陳威尹) <wychen@chromium.org> | 2016-08-19 16:41:55 -0700 |
---|---|---|
committer | Wei-Yin Chen (陳威尹) <wychen@chromium.org> | 2016-08-31 17:28:51 -0700 |
commit | 48811b2eddadf723b0685934025735163c74362f (patch) | |
tree | 8e933982d6d886d95d3afa9fda1fcb7fe332ff9e /src | |
parent | 11d6cb56d0df8427dd1a768d39a9717c2c4a7e70 (diff) | |
download | protobuf-48811b2eddadf723b0685934025735163c74362f.tar.gz protobuf-48811b2eddadf723b0685934025735163c74362f.tar.bz2 protobuf-48811b2eddadf723b0685934025735163c74362f.zip |
Fix Win32ErrorMessage on Unicode build
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/subprocess.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/google/protobuf/compiler/subprocess.cc b/src/google/protobuf/compiler/subprocess.cc index 6e258664..e929e4fb 100644 --- a/src/google/protobuf/compiler/subprocess.cc +++ b/src/google/protobuf/compiler/subprocess.cc @@ -261,12 +261,12 @@ string Subprocess::Win32ErrorMessage(DWORD error_code) { char* message; // WTF? - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, error_code, 0, - (LPTSTR)&message, // NOT A BUG! - 0, NULL); + FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, error_code, 0, + (LPSTR)&message, // NOT A BUG! + 0, NULL); string result = message; LocalFree(message); |