diff options
Diffstat (limited to 'options.cpp')
-rwxr-xr-x | options.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/options.cpp b/options.cpp index 6fb37bb..8360a26 100755 --- a/options.cpp +++ b/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) { |