debug: cache win32 error code before logging
the code beneath LOG_WARNING and friends is opaque, and may accidentally replace the value of GetLastError before we have a chance to render it.
This commit is contained in:
parent
755ba5a6a7
commit
335703b147
@ -47,7 +47,8 @@ void
|
|||||||
prepare_debugger (void)
|
prepare_debugger (void)
|
||||||
{
|
{
|
||||||
if (nullptr == LoadLibrary("exchndl.dll")) {
|
if (nullptr == LoadLibrary("exchndl.dll")) {
|
||||||
LOG_WARNING("Emergency debugger not loaded: %s", util::win32_error::code_string ());
|
auto code = GetLastError ();
|
||||||
|
LOG_WARNING("Emergency debugger not loaded: %s", util::win32_error::code_string (code));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user