summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/mmi.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-02-22 04:56:32 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-02-22 04:56:32 +0000
commit400d2e50f52fe113f2130db6062fef4a970a1042 (patch)
treef0d5e62c4573d75ef83542543d687c5c18c499c4 /plugins/SecureIM/src/mmi.cpp
parentd68ef14d25a6b9f3dcec6700e812dc5012aa59ba (diff)
hooking loading/unloading events
git-svn-id: http://svn.miranda-ng.org/main/trunk@3676 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/mmi.cpp')
-rw-r--r--plugins/SecureIM/src/mmi.cpp19
1 files changed, 7 insertions, 12 deletions
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;