summaryrefslogtreecommitdiff
path: root/plugins/TipperYM/src/subst.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-23 18:08:26 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-23 18:08:26 +0000
commit9cadeadaff74b37df1c2896e653a80b3ce4c86f6 (patch)
tree399715b05def27cc4e13ced2cbefad3a17b77c4e /plugins/TipperYM/src/subst.cpp
parent6fcfba2c46a456677b5825a899469ba4e8905448 (diff)
replace _tcsncpy to mir_tstrncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13786 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/src/subst.cpp')
-rw-r--r--plugins/TipperYM/src/subst.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 998694c0e6..91740cf8af 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -272,7 +272,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
else if (szProto) {
PROTOACCOUNT *pa = ProtoGetAccount(szProto);
if (pa && pa->tszAccountName) {
- _tcsncpy(buff, pa->tszAccountName, bufflen);
+ mir_tstrncpy(buff, pa->tszAccountName, bufflen);
return true;
}
else
@@ -290,7 +290,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
else if (!mir_tstrcmp(swzRawSpec, _T("status_msg"))) {
TCHAR *swzMsg = GetStatusMessageText(hContact);
if (swzMsg) {
- _tcsncpy(buff, swzMsg, bufflen);
+ mir_tstrncpy(buff, swzMsg, bufflen);
mir_free(swzMsg);
return true;
}
@@ -298,7 +298,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out"))) {
TCHAR *swzMsg = GetLastMessageText(hContact, recv);
if (swzMsg) {
- _tcsncpy(buff, swzMsg, bufflen);
+ mir_tstrncpy(buff, swzMsg, bufflen);
mir_free(swzMsg);
return true;
}
@@ -310,7 +310,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
return false;
TCHAR *swzNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hSubContact, GCDNF_TCHAR);
- if (swzNick) _tcsncpy(buff, swzNick, bufflen);
+ if (swzNick) mir_tstrncpy(buff, swzNick, bufflen);
return true;
}
else if (!mir_tstrcmp(swzRawSpec, _T("meta_subuid"))) {
@@ -581,7 +581,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF
if (ds_node)
GetSubstText(hContact, ds_node->ds, swzAlt, VALUE_LEN);
else {
- _tcsncpy(swzAlt, p, VALUE_LEN);
+ mir_tstrncpy(swzAlt, p, VALUE_LEN);
bAltSubst = true;
}
}
@@ -619,12 +619,12 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF
if (bSubst) {
size_t rep_len = mir_tstrlen(swzRep);
- _tcsncpy(&swzDest[di], swzRep, min(rep_len, iDestLen - di));
+ mir_tstrncpy(&swzDest[di], swzRep, min(rep_len, iDestLen - di));
di += rep_len - 1; // -1 because we inc at bottom of loop
}
else if (bAltSubst) {
size_t alt_len = mir_tstrlen(swzAlt);
- _tcsncpy(&swzDest[di], swzAlt, min(alt_len, iDestLen - di));
+ mir_tstrncpy(&swzDest[di], swzAlt, min(alt_len, iDestLen - di));
di += alt_len - 1; // -1 because we inc at bottom of loop
}
else goto empty; // empty value
@@ -643,7 +643,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF
if (parseTipperVarsFirst) {
swzVarSrc = variables_parsedup(swzDest, 0, hContact);
- _tcsncpy(swzDest, swzVarSrc, iDestLen);
+ mir_tstrncpy(swzDest, swzVarSrc, iDestLen);
mir_free(swzVarSrc);
}