From 5c39998e831c982812d1a6c7b9747f695c4dbeef Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 16 Jul 2014 13:51:05 +0000 Subject: as well as wcsncpy_s / wcsncat_s git-svn-id: http://svn.miranda-ng.org/main/trunk@9830 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StartupSilence/src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/StartupSilence/src/main.cpp') diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index d863ee46c3..496b26cc88 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -237,9 +237,9 @@ static INT_PTR AdvSt() ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)(NonStatusAllow == 1 ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME))); ppd.lchContact = NULL; ppd.iSeconds = PopUpTime; - wcsncpy_s(ppd.lptzText, lptzText, size_t(lptzText)); + wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE); lptzText = TranslateT(MENU_NAME); - wcsncpy_s(ppd.lptzContactName, lptzText, size_t(lptzText)); + wcsncpy_s(ppd.lptzContactName, lptzText, _TRUNCATE); PUAddPopupT(&ppd); } @@ -250,7 +250,7 @@ static INT_PTR AdvSt() if (PopUp == 1) { lptzText = (DefEnabled == 1 && DefPopup == 1) ? TranslateT(ALL_ENABLED_FLT) : ALL_ENABLED; ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)((DefEnabled == 1 && DefPopup == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME))); - wcsncpy_s(ppd.lptzText, lptzText, size_t(lptzText)); + wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE); PUAddPopupT(&ppd); } if (DefEnabled == 1) { //predefined sound setting @@ -273,9 +273,9 @@ static INT_PTR SturtupSilenceEnabled(WPARAM wParam, LPARAM lParam) ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)(Enabled == 1 ? GetIconHandle(ENABLE_SILENCE) : GetIconHandle(DISABLE_SILENCE))); ppd.lchContact = NULL; ppd.iSeconds = PopUpTime; - wcsncpy_s(ppd.lptzText, lptzText, size_t(lptzText)); + wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE); lptzText = TranslateT(MENU_NAME); - wcsncpy_s(ppd.lptzContactName, lptzText, size_t(lptzText)); + wcsncpy_s(ppd.lptzContactName, lptzText, _TRUNCATE); PUAddPopupT(&ppd); } return 0; -- cgit v1.2.3