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 /protocols/MRA/src/MraSelectEMail.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 'protocols/MRA/src/MraSelectEMail.cpp')
-rw-r--r-- | protocols/MRA/src/MraSelectEMail.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/MRA/src/MraSelectEMail.cpp b/protocols/MRA/src/MraSelectEMail.cpp index ad8b4f11a8..f956bddbec 100644 --- a/protocols/MRA/src/MraSelectEMail.cpp +++ b/protocols/MRA/src/MraSelectEMail.cpp @@ -14,7 +14,7 @@ void AddContactEMailToListParam(MCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModu if (DB_GetStringA(hContact, lpszModule, lpszValueName, szEmail)) {
if (bMRAOnly == FALSE || IsEMailMR(szEmail)) {
WCHAR wszBuff[MAX_EMAIL_LEN];
- MultiByteToWideChar(MRA_CODE_PAGE, 0, szEmail, -1, wszBuff, SIZEOF(wszBuff));
+ MultiByteToWideChar(MRA_CODE_PAGE, 0, szEmail, -1, wszBuff, _countof(wszBuff));
if (SendMessage(hWndList, LB_FINDSTRING, -1, (LPARAM)wszBuff) == LB_ERR)
SendMessage(hWndList, LB_ADDSTRING, 0, (LPARAM)wszBuff);
}
@@ -22,11 +22,11 @@ void AddContactEMailToListParam(MCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModu for (int i = 0; true; i++) {
char szBuff[MAX_PATH];
- mir_snprintf(szBuff, SIZEOF(szBuff), "%s%lu", lpszValueName, i);
+ mir_snprintf(szBuff, _countof(szBuff), "%s%lu", lpszValueName, i);
if (DB_GetStringA(hContact, lpszModule, szBuff, szEmail)) {
if (bMRAOnly == FALSE || IsEMailMR(szEmail)) {
WCHAR wszBuff[MAX_EMAIL_LEN];
- MultiByteToWideChar(MRA_CODE_PAGE, 0, szEmail, -1, wszBuff, SIZEOF(wszBuff));
+ MultiByteToWideChar(MRA_CODE_PAGE, 0, szEmail, -1, wszBuff, _countof(wszBuff));
if (SendMessage(hWndList, LB_FINDSTRING, -1, (LPARAM)wszBuff) == LB_ERR)
SendMessage(hWndList, LB_ADDSTRING, 0, (LPARAM)wszBuff);
}
|