From cad77e7d51aef2c4d938fca592921e14d923f8c5 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 31 Dec 2014 10:37:03 +0000 Subject: minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@11691 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/options.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/NewXstatusNotify/src/options.cpp') diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 7ef2e24e81..811fe50d2a 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -381,32 +381,33 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM { TCHAR str[MAX_SECONDLINE] = { 0 }; for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++) { - _tcsncpy(str, _T(""), MAX_SECONDLINE); + _tcsncpy(str, _T(""), SIZEOF(str)); if (opt.ShowStatus) { if (opt.UseAlternativeText == 1) - _tcsncpy(str, StatusList[Index(i)].lpzUStatusText, MAX_SECONDLINE); + _tcsncpy(str, StatusList[Index(i)].lpzUStatusText, SIZEOF(str)); else - _tcsncpy(str, StatusList[Index(i)].lpzStandardText, MAX_SECONDLINE); + _tcsncpy(str, StatusList[Index(i)].lpzStandardText, SIZEOF(str)); if (opt.ShowPreviousStatus) { TCHAR buff[MAX_STATUSTEXT]; mir_sntprintf(buff, SIZEOF(buff), TranslateTS(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(i)].lpzStandardText); - mir_sntprintf(str, SIZEOF(str), _T("%s %s"), str, buff); + mir_tstrcat(str, _T(" ")); + mir_tstrcat(str, buff); } } if (opt.ReadAwayMsg) { if (str[0]) - _tcscat(str, _T("\n")); - _tcsncat(str, TranslateT("This is status message"), MAX_SECONDLINE); + mir_tstrcat(str, _T("\n")); + mir_tstrcat(str, TranslateT("This is status message")); } ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, i), i, str); } - _tcsncpy(str, TranslateT("This is extra status"), MAX_SECONDLINE); + _tcsncpy(str, TranslateT("This is extra status"), SIZEOF(str)); ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_EXTRASTATUS, str); - _tcsncpy(str, TranslateT("This is status message"), MAX_SECONDLINE); + _tcsncpy(str, TranslateT("This is status message"), SIZEOF(str)); ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_STATUSMSG, str); return FALSE; -- cgit v1.2.3