summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/image_utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-02 17:15:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-02 17:15:49 +0000
commit53b1b8e2ec83e13c5c7f7d87cd0da87313a3c8ec (patch)
tree4d8ed926ede9fc1e0af6d59c9c1574398ec02787 /plugins/AVS/src/image_utils.cpp
parente9076c9059c357a52b511ac3f27887602b1254d0 (diff)
fix for old avatar setting code in AVS
git-svn-id: http://svn.miranda-ng.org/main/trunk@5902 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/src/image_utils.cpp')
-rw-r--r--plugins/AVS/src/image_utils.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp
index 3092e47519..f081908245 100644
--- a/plugins/AVS/src/image_utils.cpp
+++ b/plugins/AVS/src/image_utils.cpp
@@ -717,15 +717,9 @@ BOOL MakeTransparentBkg(HANDLE hContact, HBITMAP *hBitmap)
int SaveAvatar( const char* protocol, const TCHAR* tszFileName )
{
- int result = CallProtoService(protocol, PS_SETMYAVATART, 0, ( LPARAM )tszFileName);
- if ( result == CALLSERVICE_NOTFOUND ) {
- if ( tszFileName != NULL ) {
- char szFileName[ MAX_PATH ];
- WideCharToMultiByte( CP_ACP, 0, tszFileName, -1, szFileName, SIZEOF(szFileName), 0, 0 );
- result = CallProtoService(protocol, PS_SETMYAVATAR, 0, ( LPARAM )szFileName);
- }
- else result = CallProtoService(protocol, PS_SETMYAVATAR, 0, 0);
- }
+ INT_PTR result = CallProtoService(protocol, PS_SETMYAVATART, 0, ( LPARAM )tszFileName);
+ if ( result == CALLSERVICE_NOTFOUND )
+ result = CallProtoService(protocol, PS_SETMYAVATAR, 0, (LPARAM)(char*)_T2A(tszFileName));
return result;
}