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/Steam/src/steam_dialogs.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/Steam/src/steam_dialogs.cpp') diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp index c804369dbb..3e768f982d 100644 --- a/protocols/Steam/src/steam_dialogs.cpp +++ b/protocols/Steam/src/steam_dialogs.cpp @@ -10,7 +10,7 @@ CSteamPasswordEditor::CSteamPasswordEditor(CSteamProto *proto) : void CSteamPasswordEditor::OnInitDialog() { char iconName[100]; - mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", MODULE, "main"); + mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "main"); SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(iconName, false)); SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(iconName, true)); @@ -48,7 +48,7 @@ CSteamGuardDialog::CSteamGuardDialog(CSteamProto *proto, const char *domain) : void CSteamGuardDialog::OnInitDialog() { char iconName[100]; - mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", MODULE, "main"); + mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "main"); SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(iconName, false)); SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(iconName, true)); @@ -59,7 +59,7 @@ void CSteamGuardDialog::OnInitDialog() void CSteamGuardDialog::OnOk(CCtrlButton*) { - mir_strncpy(m_guardCode, ptrA(m_text.GetTextA()), SIZEOF(m_guardCode) + 1); + mir_strncpy(m_guardCode, ptrA(m_text.GetTextA()), _countof(m_guardCode) + 1); EndDialog(m_hwnd, 1); } @@ -95,7 +95,7 @@ CSteamCaptchaDialog::~CSteamCaptchaDialog() void CSteamCaptchaDialog::OnInitDialog() { char iconName[100]; - mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", MODULE, "main"); + mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, "main"); SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(iconName, false)); SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(iconName, true)); @@ -106,7 +106,7 @@ void CSteamCaptchaDialog::OnInitDialog() void CSteamCaptchaDialog::OnOk(CCtrlButton*) { - mir_strncpy(m_captchaText, ptrA(m_text.GetTextA()), SIZEOF(m_captchaText) + 1); + mir_strncpy(m_captchaText, ptrA(m_text.GetTextA()), _countof(m_captchaText) + 1); EndDialog(m_hwnd, 1); } -- cgit v1.2.3