mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[common] windebug: pass FORMAT_MESSAGE_IGNORE_INSERTS to FormatMessage
This avoids problems when the error message we are told to format contains inserts like %1. See https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353 for details (or for fun).
This commit is contained in:
parent
2ff32b230e
commit
ccda264648
@ -25,7 +25,7 @@ void DebugWinError(const char * file, const unsigned int line, const char * func
|
||||
{
|
||||
char *buffer;
|
||||
FormatMessageA(
|
||||
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL,
|
||||
status,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
|
Loading…
Reference in New Issue
Block a user