summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-16 13:51:05 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-16 13:51:05 +0000
commit5c39998e831c982812d1a6c7b9747f695c4dbeef (patch)
treede081af4ffbbe14e53829311ec84832aa28bd7bb
parenteefe0f0d556fbf3d77602d0a99b9134505050756 (diff)
as well as wcsncpy_s / wcsncat_s
git-svn-id: http://svn.miranda-ng.org/main/trunk@9830 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/StartupSilence/src/main.cpp10
-rw-r--r--protocols/MRA/src/Mra_proto.cpp8
2 files changed, 9 insertions, 9 deletions
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;
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 1f189c83a5..48d3c8ccdf 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -959,19 +959,19 @@ bool CMraProto::CmdAnketaInfo(int seq, BinBuffer &buf)
}
else if (fld == "Domain") { // имя было уже задано ранее
buf >> val;
- wcsncpy_s(szEmail, _A2T(mralpsUsernameValue + "@" + val), SIZEOF(szEmail));
+ wcsncpy_s(szEmail, _A2T(mralpsUsernameValue + "@" + val), _TRUNCATE);
}
else if (fld == "Nickname") {
buf >> valW;
- wcsncpy_s(szNick, valW, SIZEOF(szNick));
+ wcsncpy_s(szNick, valW, _TRUNCATE);
}
else if (fld == "FirstName") {
buf >> valW;
- wcsncpy_s(szFirstName, valW, SIZEOF(szFirstName));
+ wcsncpy_s(szFirstName, valW, _TRUNCATE);
}
else if (fld == "LastName") {
buf >> valW;
- wcsncpy_s(szLastName, valW, SIZEOF(szLastName));
+ wcsncpy_s(szLastName, valW, _TRUNCATE);
}
else buf >> val;
}