summaryrefslogtreecommitdiff
path: root/plugins/AvatarHistory/src/AvatarHistory.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 /plugins/AvatarHistory/src/AvatarHistory.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 'plugins/AvatarHistory/src/AvatarHistory.cpp')
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index ff105f96d1..04b88b5942 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -77,7 +77,7 @@ static INT_PTR GetCachedAvatar(WPARAM wParam, LPARAM lParam)
TCHAR hash[128];
_tcsncpy_s(hash, (TCHAR*)lParam, _TRUNCATE);
- ConvertToFilename(hash, SIZEOF(hash));
+ ConvertToFilename(hash, _countof(hash));
return (INT_PTR)GetCachedAvatar((char*)wParam, hash);
}
@@ -172,12 +172,12 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
TCHAR hash[128];
_tcsncpy_s(hash, avatar->hash, _TRUNCATE);
- ConvertToFilename(hash, SIZEOF(hash));
+ ConvertToFilename(hash, _countof(hash));
TCHAR *file = GetCachedAvatar(proto, hash);
if (file != NULL) {
- mir_tstrncpy(history_filename, file, SIZEOF(history_filename));
+ mir_tstrncpy(history_filename, file, _countof(history_filename));
mir_free(file);
}
else {
@@ -186,7 +186,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
else
GetProtocolFolder(history_filename, proto);
- mir_sntprintf(history_filename, SIZEOF(history_filename),
+ mir_sntprintf(history_filename, _countof(history_filename),
_T("%s\\%s"), history_filename, hash);
if (CopyImageFile(avatar->filename, history_filename))
@@ -235,7 +235,7 @@ static int PreShutdown(WPARAM, LPARAM)
static int ModulesLoaded(WPARAM, LPARAM)
{
- mir_sntprintf(basedir, SIZEOF(basedir), _T("%s\\Avatars History"), profilePath);
+ mir_sntprintf(basedir, _countof(basedir), _T("%s\\Avatars History"), profilePath);
hFolder = FoldersRegisterCustomPathT( LPGEN("Avatars"), LPGEN("Avatar History"),
PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\Avatars History"));