diff --git a/README.md b/README.md index be13d7b2..881496f4 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ For those situations where one must quckly compose a temporary string using `spr if (dwMaxSendPacketSize < sizeof(EapPacket)) throw std::invalid_argument( winstd::string_printf( - "Maximum packet size too small (minimum: %zu, available: %u).", + "Maximum packet size too small (minimum: %zu, available: %u)", sizeof(EapPacket) + 1, dwMaxSendPacketSize)); ``` diff --git a/include/WinStd/COM.h b/include/WinStd/COM.h index 38ba6542..fc8e07e9 100644 --- a/include/WinStd/COM.h +++ b/include/WinStd/COM.h @@ -276,7 +276,7 @@ namespace winstd vt = VT_EMPTY; const HRESULT hr = VariantCopy(this, &varSrc); if (FAILED(hr)) - throw winstd::com_runtime_error(hr, "VariantCopy failed."); + throw winstd::com_runtime_error(hr, "VariantCopy failed"); } /// @@ -472,7 +472,7 @@ namespace winstd LPSAFEARRAY pCopy; const HRESULT hr = SafeArrayCopy(const_cast(pSrc), &pCopy); if (FAILED(hr)) - throw winstd::com_runtime_error(hr, "SafeArrayCopy failed."); + throw winstd::com_runtime_error(hr, "SafeArrayCopy failed"); SafeArrayGetVartype(const_cast(pSrc), &vt); vt |= VT_ARRAY; @@ -495,7 +495,7 @@ namespace winstd if (this != &varSrc) { const HRESULT hr = VariantCopy(this, &varSrc); if (FAILED(hr)) - throw winstd::com_runtime_error(hr, "VariantCopy failed."); + throw winstd::com_runtime_error(hr, "VariantCopy failed"); } return *this; } diff --git a/include/WinStd/Crypt.h b/include/WinStd/Crypt.h index 6ccdbbb6..8847062c 100644 --- a/include/WinStd/Crypt.h +++ b/include/WinStd/Crypt.h @@ -693,7 +693,7 @@ namespace winstd cbData = other.cbData; if (cbData) { pbData = static_cast(LocalAlloc(LMEM_FIXED, other.cbData)); - if (!pbData) throw win_runtime_error("LocalAlloc failed."); + if (!pbData) throw win_runtime_error("LocalAlloc failed"); memcpy(pbData, other.pbData, other.cbData); } else pbData = NULL; @@ -730,7 +730,7 @@ namespace winstd LocalFree(pbData); if (cbData) { pbData = static_cast(LocalAlloc(LMEM_FIXED, other.cbData)); - if (!pbData) throw win_runtime_error("LocalAlloc failed."); + if (!pbData) throw win_runtime_error("LocalAlloc failed"); memcpy(pbData, other.pbData, other.cbData); } else pbData = NULL; diff --git a/include/WinStd/WinTrust.h b/include/WinStd/WinTrust.h index 0c203f23..4baa4e38 100644 --- a/include/WinStd/WinTrust.h +++ b/include/WinStd/WinTrust.h @@ -35,7 +35,7 @@ namespace winstd { const LONG lResult = WinVerifyTrust(m_hwnd, &m_action, &m_wtd); if (lResult != ERROR_SUCCESS) - throw win_runtime_error(lResult, "WinVerifyTrust failed."); + throw win_runtime_error(lResult, "WinVerifyTrust failed"); } ///