From bd198cb6e2e7034aad3951605a7953cd9ff8b352 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sat, 13 Aug 2022 18:28:19 +0800 Subject: [PATCH] upd: [system] adjust the error_msg error print in Windows --- src/libimp/platform/win/system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,