summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CloudFile/src/utils.cpp')
-rw-r--r--plugins/CloudFile/src/utils.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/CloudFile/src/utils.cpp b/plugins/CloudFile/src/utils.cpp
index 44a3149a25..24559827ef 100644
--- a/plugins/CloudFile/src/utils.cpp
+++ b/plugins/CloudFile/src/utils.cpp
@@ -3,12 +3,9 @@
void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT hContact)
{
if (Miranda_IsTerminated())
- {
return;
- }
- if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
- {
+ if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1)) {
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME);
@@ -91,11 +88,9 @@ void PasteToClipboard(const wchar_t *data)
HGLOBAL hClipboardData = GlobalAlloc(NULL, size);
if (hClipboardData) {
wchar_t *pchData = (wchar_t*)GlobalLock(hClipboardData);
- if (pchData) {
- memcpy(pchData, (wchar_t*)data, size);
- GlobalUnlock(hClipboardData);
- SetClipboardData(CF_UNICODETEXT, hClipboardData);
- }
+ mir_wstrcpy(pchData, data);
+ GlobalUnlock(hClipboardData);
+ SetClipboardData(CF_UNICODETEXT, hClipboardData);
}
CloseClipboard();
}