summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-03-28 13:35:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-03-28 13:35:02 +0000
commit1ab65d264fee46914571415551ed78cde14315a6 (patch)
tree670ff6fce506f8dd4c52f76e68aebefd0176b862 /protocols/JabberG/src/jabber_misc.cpp
parent7bb399de4c4afa30fe016d25260a105448476374 (diff)
- unused code removed;
- dynamic memory allocation for JabberSha1() replaced with static git-svn-id: http://svn.miranda-ng.org/main/trunk@12535 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_misc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index ae21a785a7..976b275a9c 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -192,7 +192,8 @@ void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t c
const TCHAR* szFileType = ProtoGetAvatarExtension( getByte(hContact, "AvatarType", PA_FORMAT_PNG));
if (hContact != NULL) {
- char str[ 256 ];
+ char str[256];
+ JabberShaStrBuf buf;
DBVARIANT dbv;
if (!db_get_utf(hContact, m_szModuleName, "jid", &dbv)) {
strncpy_s(str, dbv.pszVal, _TRUNCATE);
@@ -200,7 +201,7 @@ void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t c
db_free(&dbv);
}
else _i64toa((LONG_PTR)hContact, str, 10);
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S%s"), ptrA(JabberSha1(str)), szFileType);
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S%s"), JabberSha1(str, buf), szFileType);
}
else if (m_ThreadInfo != NULL) {
mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%s@%S avatar%s"),