From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/MraSelectEMail.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/MRA/src/MraSelectEMail.cpp') 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); } -- cgit v1.2.3