summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/avatars.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-11 10:41:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-11 10:41:37 +0000
commit94dcc72f13094157f344f284aec4edf0c0f5faa1 (patch)
tree74c078daadd4abe5aea9e9e0a73b4dd7c4a7fde1 /protocols/FacebookRM/src/avatars.cpp
parent42ff2169dbddd25d06404623dba2fff222d17c73 (diff)
ProtoGetAvatarFormat, ProtoGetAvatarFileFormat, ProtoGetBufferFormat, ProtoGetAvatarExtension - standard helpers for protocol avatars' processing instead of the zoo that existed previously
git-svn-id: http://svn.miranda-ng.org/main/trunk@5645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/avatars.cpp')
-rw-r--r--protocols/FacebookRM/src/avatars.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp
index 58b7f4f504..5540bd1848 100644
--- a/protocols/FacebookRM/src/avatars.cpp
+++ b/protocols/FacebookRM/src/avatars.cpp
@@ -41,10 +41,8 @@ bool FacebookProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATIONT &ai, std::string *
db_free(&dbv);
ai.hContact = ai.hContact;
- ai.format = ext_to_format(ext);
- _tcsncpy(ai.filename, filename.c_str(), SIZEOF(ai.filename));
- ai.filename[SIZEOF(ai.filename)-1] = 0;
-
+ _tcsncpy_s(ai.filename, SIZEOF(ai.filename), filename.c_str(), _TRUNCATE);
+ ai.format = ProtoGetAvatarFormat(ai.filename);
return true;
}
}