summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_avatars.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/VKontakte/src/vk_avatars.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_avatars.cpp')
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp
index ef54de209f..85e97f9906 100644
--- a/protocols/VKontakte/src/vk_avatars.cpp
+++ b/protocols/VKontakte/src/vk_avatars.cpp
@@ -23,7 +23,7 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest* pReq)
return;
PROTO_AVATAR_INFORMATION ai = { 0 };
- GetAvatarFileName((MCONTACT)pReq->pUserInfo, ai.filename, SIZEOF(ai.filename));
+ GetAvatarFileName((MCONTACT)pReq->pUserInfo, ai.filename, _countof(ai.filename));
ai.format = ProtoGetBufferFormat(reply->pData);
FILE *out = _tfopen(ai.filename, _T("wb"));
@@ -80,8 +80,8 @@ INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam)
return GAIR_NOAVATAR;
TCHAR tszFileName[MAX_PATH];
- GetAvatarFileName(pai->hContact, tszFileName, SIZEOF(tszFileName));
- _tcsncpy(pai->filename, tszFileName, SIZEOF(pai->filename));
+ GetAvatarFileName(pai->hContact, tszFileName, _countof(tszFileName));
+ _tcsncpy(pai->filename, tszFileName, _countof(pai->filename));
pai->format = ProtoGetAvatarFormat(pai->filename);
@@ -160,7 +160,7 @@ void CVkProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl)
setByte(hContact,"NeedNewAvatar", 1);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
- GetAvatarFileName(ai.hContact, ai.filename, SIZEOF(ai.filename));
+ GetAvatarFileName(ai.hContact, ai.filename, _countof(ai.filename));
ai.format = ProtoGetAvatarFormat(ai.filename);
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
}