summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-10-19 09:15:20 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-10-19 09:15:20 +0300
commitcae60e6558eac18ed90f5e9b1793b9c940597f32 (patch)
tree58acb650ad41ac2b1b71540e5c80643195cb4747 /options.cpp
parentf9f50a5ce2120ca30100dcbc47b5b4cea6b44b77 (diff)
modified: options.cpp
Diffstat (limited to 'options.cpp')
-rwxr-xr-xoptions.cpp10
1 files changed, 4 insertions, 6 deletions
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))