diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 13:03:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 13:03:10 +0000 |
commit | 46789bd14d5fc7448dbd1b68138a8b08964353bc (patch) | |
tree | 27851079c9870206fe7ccb9e2248dff8ff550af2 /plugins/UserInfoEx/src/svc_reminder.cpp | |
parent | 1f91ea192b7cbc5265e9bca4c69fcbc157402cfa (diff) |
safe lstr* replacements: mir_strlen, mir_wstrlen, mir_strcpy, mir_wstrcpy,
mir_strncpy, mir_wstrncpy, mir_strcat, mir_wstrcat, mir_strncat, mir_wstrncat
git-svn-id: http://svn.miranda-ng.org/main/trunk@11171 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/svc_reminder.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/svc_reminder.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 59420bba5c..6e0acf4ff6 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -258,9 +258,9 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT mir_sntprintf(ppd.lptzContactName, SIZEOF(ppd.lptzContactName),
_T("%s - %s"), TranslateTS(pszDesc), DB::Contact::DisplayName(hContact));
}
- else mir_tcsncpy(ppd.lptzContactName, TranslateT("Reminder"), SIZEOF(ppd.lptzContactName));
+ else mir_tstrncpy(ppd.lptzContactName, TranslateT("Reminder"), SIZEOF(ppd.lptzContactName));
- mir_tcsncpy(ppd.lptzText, pszMsg, MAX_SECONDLINE);
+ mir_tstrncpy(ppd.lptzText, pszMsg, MAX_SECONDLINE);
ppd.lchIcon = GetAnnivIcon(CEvent(eventType, DaysToAnniv));
@@ -412,7 +412,7 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE mir_sntprintf(szAnniv, MAX_PATH,
TranslateT("%s has the following anniversaries:\0"),
ContactGender(hContact));
- mir_tcsncpy(strMsg, szAnniv, mir_tcslen(szAnniv));
+ mir_tstrncpy(strMsg, szAnniv, mir_tstrlen(szAnniv));
}
switch (Diff) {
@@ -426,19 +426,19 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE mir_sntprintf(szAnniv, MAX_PATH, TranslateT("%d. %s in %d days\0"), mta.Age() + 1, mta.Description(), Diff);
}
- if (mir_tcslen(szAnniv) >= MAX_SECONDLINE - mir_tcslen(strMsg)) {
+ if (mir_tstrlen(szAnniv) >= MAX_SECONDLINE - mir_tstrlen(strMsg)) {
if (strMsg)
- mir_tcsncat(strMsg, _T("\n...\0"), SIZEOF(strMsg));
+ mir_tstrncat(strMsg, _T("\n...\0"), SIZEOF(strMsg));
else
- mir_tcsncpy(strMsg, _T("\n...\0"), mir_tcslen(_T("\n...\0")));
+ mir_tstrncpy(strMsg, _T("\n...\0"), mir_tstrlen(_T("\n...\0")));
bOverflow = TRUE;
}
else {
if (strMsg)
- mir_tcsncat(strMsg, _T("\n- \0"), SIZEOF(strMsg));
+ mir_tstrncat(strMsg, _T("\n- \0"), SIZEOF(strMsg));
else
- mir_tcsncpy(strMsg, _T("\n- \0"), mir_tcslen(_T("\n- \0")));
- mir_tcsncat(strMsg, szAnniv, SIZEOF(strMsg));
+ mir_tstrncpy(strMsg, _T("\n- \0"), mir_tstrlen(_T("\n- \0")));
+ mir_tstrncat(strMsg, szAnniv, SIZEOF(strMsg));
}
}
}
|