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 --- plugins/AVS/src/options.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/AVS/src/options.cpp') diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 0f7793b45f..3294089c99 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -100,7 +100,7 @@ static void RemoveProtoPic(const char *szProto) static void SetProtoPic(char *szProto) { TCHAR FileName[MAX_PATH], filter[256]; - Bitmap_GetFilter(filter, SIZEOF(filter)); + Bitmap_GetFilter(filter, _countof(filter)); OPENFILENAME ofn = { 0 }; ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; @@ -388,7 +388,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar if (!db_get_ts(NULL, PPICT_MODULE, g_selectedProto, &dbv)) { if (!PathIsAbsoluteT(VARST(dbv.ptszVal))) { TCHAR szFinalPath[MAX_PATH]; - mir_sntprintf(szFinalPath, SIZEOF(szFinalPath), _T("%%miranda_path%%\\%s"), dbv.ptszVal); + mir_sntprintf(szFinalPath, _countof(szFinalPath), _T("%%miranda_path%%\\%s"), dbv.ptszVal); SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, szFinalPath); } else SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, dbv.ptszVal); @@ -1081,7 +1081,7 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP break; char description[256]; - CallProtoService(proto, PS_GETNAME, SIZEOF(description), (LPARAM)description); + CallProtoService(proto, PS_GETNAME, _countof(description), (LPARAM)description); TCHAR *descr = mir_a2t(description); if (MessageBox(hwndDlg, TranslateT("Are you sure you want to remove your avatar?"), descr, MB_YESNO) == IDYES) avSetMyAvatar(proto, _T("")); -- cgit v1.2.3