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/BossKeyPlus/src/BossKey.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/BossKeyPlus/src/BossKey.cpp') diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 61bafe3dc6..623685f7d6 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -118,7 +118,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam uid = LOWORD(wParam); if (uid == IDOK){ char password[MAXPASSLEN + 1] = { 0 }; - int passlen = GetDlgItemTextA(hDlg, IDC_EDIT1, password, SIZEOF(password)); + int passlen = GetDlgItemTextA(hDlg, IDC_EDIT1, password, _countof(password)); if (passlen == 0) { SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Miranda NG is locked.\nEnter password to unlock it.")); SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0); @@ -491,7 +491,7 @@ static TCHAR *HokeyVkToName(WORD vkKey) code |= (1UL << 24); } - GetKeyNameText(code, buf, SIZEOF(buf)); + GetKeyNameText(code, buf, _countof(buf)); return buf; } @@ -713,7 +713,7 @@ extern "C" int __declspec(dllexport) Load(void) db_set_b(NULL, "Popup", "ModuleIsEnabled", 0); } - Icon_Register(g_hInstance, "BossKey", iconList, SIZEOF(iconList)); + Icon_Register(g_hInstance, "BossKey", iconList, _countof(iconList)); g_hHideService = CreateServiceFunction(MS_BOSSKEY_HIDE, BossKeyHideMiranda); // Create service -- cgit v1.2.3