diff options
Diffstat (limited to 'protocols/Tlen/src/tlen_avatar.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_avatar.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index e0722447a9..d548dc3c31 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -42,7 +42,7 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* pts else { proto->debugLog(_T("getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s"), ptszDest, errno, strerror(errno)); TCHAR buffer[512]; - mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), ptszDest); + mir_sntprintf(buffer, _countof(buffer), TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), ptszDest); PUShowMessageT(buffer, SM_WARNING); } } @@ -69,7 +69,7 @@ static void RemoveAvatar(TlenProtocol *proto, MCONTACT hContact) { if (hContact == NULL) { proto->threadData->avatarHash[0] = '\0'; } - TlenGetAvatarFileName( proto, NULL, tFileName, SIZEOF(tFileName)-1); + TlenGetAvatarFileName( proto, NULL, tFileName, _countof(tFileName)-1); DeleteFile(tFileName); db_unset(hContact, "ContactPhoto", "File"); db_unset(hContact, proto->m_szModuleName, "AvatarHash"); @@ -100,7 +100,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it proto->threadData->avatarFormat = format; mir_strcpy(proto->threadData->avatarHash, md5); } - TlenGetAvatarFileName(proto, item, filename, SIZEOF(filename)-1); + TlenGetAvatarFileName(proto, item, filename, _countof(filename)-1); DeleteFile(filename); FILE *out = _tfopen(filename, TEXT("wb") ); if (out != NULL) { @@ -111,7 +111,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it db_set_dw(hContact, proto->m_szModuleName, "AvatarFormat", format); } else { TCHAR buffer[128]; - mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _tcserror(errno), errno); + mir_sntprintf(buffer, _countof(buffer), TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _tcserror(errno), errno); PUShowMessageT(buffer, SM_WARNING); proto->debugLog(buffer); return; |