summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/New_GPG/src/options.cpp')
-rwxr-xr-xplugins/New_GPG/src/options.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 8b48874774..1a76b727f0 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -711,17 +711,8 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa
params.result = &result;
gpg_launcher(params); //TODO: handle errors
if ((out.find("-----BEGIN PGP PUBLIC KEY BLOCK-----") != string::npos) && (out.find("-----END PGP PUBLIC KEY BLOCK-----") != string::npos)) {
- string::size_type p = 0, stop = 0;
- for (;;) {
- if ((p = out.find("\n", p + 2)) != string::npos) {
- if (p > stop) {
- stop = p;
- out.insert(p, "\r");
- }
- else
- break;
- }
- }
+ boost::algorithm::replace_all(out, "\n", "\r\n");
+
TCHAR *tmp3 = mir_a2t(out.c_str());
str.clear();
str.append(tmp3);