diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2016-04-23 09:53:31 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2016-04-23 09:53:31 +0000 |
commit | a6b928a9afdad2e0ce5ac8ae897f6e13670cb80b (patch) | |
tree | 6e6f149f432a0869616183fe80f1721283f53235 /plugins/New_GPG/src/options.cpp | |
parent | 7e29b6cc7f6ecfad51a245f9e8c89a5f24b36ac3 (diff) |
plugins:
new_gpg:
additional sanity checks
keep temporary files when debug is turned on
git-svn-id: http://svn.miranda-ng.org/main/trunk@16752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/options.cpp')
-rwxr-xr-x | plugins/New_GPG/src/options.cpp | 13 |
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);
|