diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-09 22:56:44 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-09 22:56:44 +0300 |
commit | 6b1b91acffcc90db9f6d8e0c466d44e2a6819dc3 (patch) | |
tree | c452f4ccd55c4e7d8593935e821f4aa5417496af /options.cpp | |
parent | e060779f0f9f76b9ffb4082c20d7c2b3a86c1513 (diff) |
modified: init.cpp
modified: messages.cpp
modified: new_gpg.rc
modified: options.cpp
modified: utilities.cpp
Diffstat (limited to 'options.cpp')
-rw-r--r-- | options.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/options.cpp b/options.cpp index c615cb8..9c1dce4 100644 --- a/options.cpp +++ b/options.cpp @@ -1048,8 +1048,14 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP tmp[size]= '\0'; key_buf.append(tmp); delete [] tmp; + f.close(); + } + if(key_buf.empty()) + { + key_buf.clear(); + debuglog<<"info: Failed to read key file\n"; + break; } - f.close(); if(((ws2 = key_buf.find(_T("-----END PGP PUBLIC KEY BLOCK-----"))) == wstring::npos) || ((ws1 = key_buf.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----"))) == wstring::npos)) { MessageBox(0, _T("This is not public key"), _T("INFO"), MB_OK); |