diff options
Diffstat (limited to 'plugins/Toaster/src/toast_notification.cpp')
-rw-r--r-- | plugins/Toaster/src/toast_notification.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/Toaster/src/toast_notification.cpp b/plugins/Toaster/src/toast_notification.cpp index 5c67f4dc0c..fa3dcfa1ce 100644 --- a/plugins/Toaster/src/toast_notification.cpp +++ b/plugins/Toaster/src/toast_notification.cpp @@ -96,13 +96,11 @@ HRESULT ToastNotification::SetTextValues(_In_reads_(textValuesCount) wchar_t** t HRESULT ToastNotification::SetImageSrc(_In_z_ wchar_t* imagePath, _In_ ABI::Windows::Data::Xml::Dom::IXmlDocument* xml)
{
- wchar_t imageSrc[MAX_PATH] = L"file:///";
- HRESULT hr = StringCchCat(imageSrc, ARRAYSIZE(imageSrc), imagePath);
- if (FAILED(hr))
- return hr;
+ wchar_t imageSrc[MAX_PATH];
+ mir_snwprintf(imageSrc, _T("file:///%s"), imagePath);
Microsoft::WRL::ComPtr<ABI::Windows::Data::Xml::Dom::IXmlNode> imageNode;
- hr = GetNodeByTag(StringReferenceWrapper(L"image").Get(), &imageNode, xml);
+ HRESULT hr = GetNodeByTag(StringReferenceWrapper(L"image").Get(), &imageNode, xml);
Microsoft::WRL::ComPtr<ABI::Windows::Data::Xml::Dom::IXmlNamedNodeMap> attributes;
hr = imageNode->get_Attributes(&attributes);
|