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/Gadu-Gadu/src/userutils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/Gadu-Gadu/src/userutils.cpp') diff --git a/protocols/Gadu-Gadu/src/userutils.cpp b/protocols/Gadu-Gadu/src/userutils.cpp index 3f3f06d14c..61ccdd4849 100644 --- a/protocols/Gadu-Gadu/src/userutils.cpp +++ b/protocols/Gadu-Gadu/src/userutils.cpp @@ -224,8 +224,8 @@ INT_PTR CALLBACK gg_userutildlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA { char pass[128], cpass[128]; BOOL enable; - GetDlgItemTextA(hwndDlg, IDC_PASSWORD, pass, SIZEOF(pass)); - GetDlgItemTextA(hwndDlg, IDC_CPASSWORD, cpass, SIZEOF(cpass)); + GetDlgItemTextA(hwndDlg, IDC_PASSWORD, pass, _countof(pass)); + GetDlgItemTextA(hwndDlg, IDC_CPASSWORD, cpass, _countof(cpass)); enable = mir_strlen(pass) && mir_strlen(cpass) && !mir_strcmp(cpass, pass); if (dat && dat->mode == GG_USERUTIL_REMOVE) EnableWindow(GetDlgItem(hwndDlg, IDOK), IsDlgButtonChecked(hwndDlg, IDC_CONFIRM) ? enable : FALSE); @@ -237,9 +237,9 @@ INT_PTR CALLBACK gg_userutildlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDOK: { char pass[128], cpass[128], email[128]; - GetDlgItemTextA(hwndDlg, IDC_PASSWORD, pass, SIZEOF(pass)); - GetDlgItemTextA(hwndDlg, IDC_CPASSWORD, cpass, SIZEOF(cpass)); - GetDlgItemTextA(hwndDlg, IDC_EMAIL, email, SIZEOF(email)); + GetDlgItemTextA(hwndDlg, IDC_PASSWORD, pass, _countof(pass)); + GetDlgItemTextA(hwndDlg, IDC_CPASSWORD, cpass, _countof(cpass)); + GetDlgItemTextA(hwndDlg, IDC_EMAIL, email, _countof(email)); EndDialog(hwndDlg, IDOK); // Check dialog box mode -- cgit v1.2.3