diff --git a/src/libimp/platform/win/system.h b/src/libimp/platform/win/system.h index b4c6a03..be23f92 100644 --- a/src/libimp/platform/win/system.h +++ b/src/libimp/platform/win/system.h @@ -55,7 +55,7 @@ std::string error_msg(result_code code) noexcept { MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpErrText, 0, NULL) == 0) { - log.error("FormatMessage fails. return = {}", ::GetLastError()); + log.error("FormatMessage fails. return = {}", error_code()); return {}; } LIBIMP_UNUSED auto buf_guard = std::unique_ptr,