From 015bb675d6eb177900c8ac94a6d35edc5ad90576 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Wed, 9 May 2018 00:11:35 +0200 Subject: 9.9 --- zen/sys_error.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'zen/sys_error.h') diff --git a/zen/sys_error.h b/zen/sys_error.h index 31eb8209..c179ec8a 100755 --- a/zen/sys_error.h +++ b/zen/sys_error.h @@ -81,7 +81,11 @@ std::wstring formatSystemError(const std::wstring& functionName, long long lastE inline std::wstring formatSystemError(const std::wstring& functionName, ErrorCode ec) { - return formatSystemError(functionName, replaceCpy(_("Error Code %x"), L"%x", numberTo(ec)), formatSystemErrorRaw(ec)); + //static_assert(sizeof(ec) == sizeof(int), ""); + //const std::wstring errorCode = printNumber(L"0x%08x", static_cast(ec)); + const std::wstring errorCode = numberTo(ec); + + return formatSystemError(functionName, replaceCpy(_("Error Code %x"), L"%x", errorCode), formatSystemErrorRaw(ec)); } -- cgit