From 2b126859937b2b3d3939fb0666bc0dcf3fcec1e6 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 28 Jan 2013 14:21:06 +0200 Subject: merged with miranda_ng main repo implemented #78 (except menu) --- src/options.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/options.cpp') diff --git a/src/options.cpp b/src/options.cpp index d635302..ab54404 100755 --- a/src/options.cpp +++ b/src/options.cpp @@ -381,8 +381,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP char *szKey = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", ""); std::string str = szKey;; mir_free(szKey); - for(std::string::size_type i = str.find("\n"); i != std::string::npos; i = str.find("\n", i+2)) - str.replace(i, 1, "\r\n"); + boost::algorithm::replace_all(str, "\n", "\r\n"); HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, str.size() +1); if(!hMem) { -- cgit v1.2.3