From 400d2e50f52fe113f2130db6062fef4a970a1042 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 Feb 2013 04:56:32 +0000 Subject: hooking loading/unloading events git-svn-id: http://svn.miranda-ng.org/main/trunk@3676 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SecureIM/src/mmi.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'plugins/SecureIM/src/mmi.cpp') diff --git a/plugins/SecureIM/src/mmi.cpp b/plugins/SecureIM/src/mmi.cpp index 76a6bd065b..09cc5f2db3 100644 --- a/plugins/SecureIM/src/mmi.cpp +++ b/plugins/SecureIM/src/mmi.cpp @@ -112,18 +112,13 @@ LPSTR utf8_to_miranda(LPCSTR szUtfMsg, DWORD& flags) { flags &= ~(PREF_UTF|PREF_UNICODE); LPWSTR wszMsg = exp->utf8decode(szUtfMsg); LPSTR szMsg = mir_u2a(wszMsg); - if ( bCoreUnicode ) { - flags |= PREF_UNICODE; - int olen = (int)wcslen((LPWSTR)wszMsg)+1; - int nlen = olen*(sizeof(WCHAR)+1); - szNewMsg = (LPSTR) mir_alloc(nlen); - memcpy(szNewMsg,szMsg,olen); - memcpy(szNewMsg+olen,wszMsg,olen*sizeof(WCHAR)); - mir_free(szMsg); - } - else { - szNewMsg = szMsg; - } + flags |= PREF_UNICODE; + int olen = (int)wcslen((LPWSTR)wszMsg)+1; + int nlen = olen*(sizeof(WCHAR)+1); + szNewMsg = (LPSTR) mir_alloc(nlen); + memcpy(szNewMsg,szMsg,olen); + memcpy(szNewMsg+olen,wszMsg,olen*sizeof(WCHAR)); + mir_free(szMsg); } else { flags &= ~PREF_UNICODE; flags |= PREF_UTF; -- cgit v1.2.3