diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-14 16:36:48 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-14 16:36:48 +0000 |
commit | 23c27ccc254699611882657dbe6936c3b3ad510f (patch) | |
tree | 37ea8eb53e234c8013963df412e0ad50f99d102e /protocols/Tlen/src/tlen_opt.cpp | |
parent | a519adcb90671bb4e3958fba5997d4fad1d50a2f (diff) |
Tlen:
- Minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12400 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen/src/tlen_opt.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_opt.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp index df5588a6a7..ead41cad56 100644 --- a/protocols/Tlen/src/tlen_opt.cpp +++ b/protocols/Tlen/src/tlen_opt.cpp @@ -596,17 +596,18 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, static void MailPopupPreview(DWORD colorBack, DWORD colorText, TCHAR *title, TCHAR *emailInfo, int delay) { + if (!ServiceExists(MS_POPUP_ADDPOPUPT)) + return; POPUPDATAT ppd = { 0 }; HICON hIcon = GetIcolibIcon(IDI_MAIL); ppd.lchIcon = CopyIcon(hIcon); ReleaseIcolibIcon(hIcon); - _tcscpy(ppd.lptzContactName, title); - _tcscpy(ppd.lptzText, emailInfo); + _tcsncpy(ppd.lptzContactName, title, MAX_CONTACTNAME-1); + _tcsncpy(ppd.lptzText, emailInfo,MAX_SECONDLINE-1); ppd.colorBack = colorBack; ppd.colorText = colorText; ppd.iSeconds = delay; - if ( ServiceExists(MS_POPUP_ADDPOPUPT)) - PUAddPopupT(&ppd); + PUAddPopupT(&ppd); } static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) |