From cae60e6558eac18ed90f5e9b1793b9c940597f32 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 19 Oct 2011 09:15:20 +0300 Subject: modified: options.cpp --- options.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'options.cpp') diff --git a/options.cpp b/options.cpp index 5f0c99f..fe81e36 100755 --- a/options.cpp +++ b/options.cpp @@ -358,13 +358,11 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if(OpenClipboard(hwndDlg)) { char *szKey = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", ""); - TCHAR *buf = mir_utf8decodeT(szKey); - mir_free(szKey); - std::wstring str = buf; - mir_free(buf); - for(std::wstring::size_type i = str.find(_T("\n")); i != std::wstring::npos; i = str.find(_T("\n"), i+2)) + std::string str = szKey;; + mir_free(szKey); + for(std::string::size_type i = str.find(_T("\n")); i != std::string::npos; i = str.find(_T("\n"), i+2)) str.replace(i, 1, _T("\r\n")); - szKey = mir_utf8encodeW(str.c_str()); + szKey = mir_strdup(str.c_str()); str.clear(); EmptyClipboard(); if(!SetClipboardData(CF_OEMTEXT, szKey)) -- cgit v1.2.3