diff --git a/common/Error.cpp b/common/Error.cpp index 1d7b54a15337d..9877e4bc73a58 100644 --- a/common/Error.cpp +++ b/common/Error.cpp @@ -141,12 +141,13 @@ void Error::SetHResult(std::string_view prefix, long err) static_cast(std::size(buf)), nullptr); if (r > 0) { - m_description = - fmt::format("{}HRESULT {:08X}: {}", prefix, err, StringUtil::WideStringToUTF8String(std::wstring_view(buf, r))); + m_description = fmt::format("{}HRESULT {:08X}: {}", prefix, static_cast(err), + StringUtil::WideStringToUTF8String(std::wstring_view(buf, r))); } else { - m_description = fmt::format("{}HRESULT {:08X}: ", prefix, err); + m_description = fmt::format("{}HRESULT {:08X}: ", prefix, + static_cast(err)); } }