summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_vcard.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-15 08:01:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-15 08:01:11 +0000
commitc68165979e5741aa201a9ac951e37fee4ca362cc (patch)
tree61313e23466d16a31904b442ca2ee20f738926c9 /protocols/JabberG/src/jabber_vcard.cpp
parent6082f8c569cd3df0ebdcec61a223027868207473 (diff)
we use bin2hex now instead of mir_snprintf("%02x")
git-svn-id: http://svn.miranda-ng.org/main/trunk@5699 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_vcard.cpp')
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index d916441f3c..21cf96574c 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -1178,9 +1178,8 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName)
mir_sha1_finish(&sha1ctx, digest);
char buf[MIR_SHA1_HASH_SIZE*2+1];
- for (int j=0; j<MIR_SHA1_HASH_SIZE; j++)
- mir_snprintf(buf + (j << 1), 2, "%02x", digest[j]);
-
+ bin2hex(digest, sizeof(digest), buf);
+
m_options.AvatarType = ProtoGetBufferFormat(buffer);
if (bPhotoChanged) {