diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/ContactsPlus/src/utils.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff) |
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ContactsPlus/src/utils.cpp')
-rw-r--r-- | plugins/ContactsPlus/src/utils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index 475879861e..3d07a8f99c 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -115,7 +115,7 @@ void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, MCONTACT hContact) void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, TCHAR *pszTitleStart)
{
TCHAR newtitle[512];
- mir_tstrncpy(newtitle, TranslateTS(pszTitleStart), SIZEOF(newtitle));
+ mir_tstrncpy(newtitle, TranslateTS(pszTitleStart), _countof(newtitle));
if (hContact) {
char *szProto = GetContactProto(hContact);
@@ -124,13 +124,13 @@ void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, TCHAR *pszTitleStart) TCHAR *contactName = pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR oldTitle[MAX_PATH];
- GetDlgItemText(hwndDlg, IDC_NAME, oldTitle, SIZEOF(oldTitle));
+ GetDlgItemText(hwndDlg, IDC_NAME, oldTitle, _countof(oldTitle));
if (mir_tstrcmp(uid ? uid : contactName, oldTitle))
SetDlgItemText(hwndDlg, IDC_NAME, uid ? uid : contactName);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
- mir_sntprintf(newtitle, SIZEOF(newtitle), _T("%s %s (%s)"), TranslateTS(pszTitleStart), contactName, szStatus);
+ mir_sntprintf(newtitle, _countof(newtitle), _T("%s %s (%s)"), TranslateTS(pszTitleStart), contactName, szStatus);
}
}
|