diff --git a/debug_win32.cpp b/debug_win32.cpp index 7afbd6a9..6a93a8d5 100644 --- a/debug_win32.cpp +++ b/debug_win32.cpp @@ -47,7 +47,8 @@ void prepare_debugger (void) { 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)); } }