summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-09-17 21:16:48 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-09-17 21:16:48 +0300
commitf130a01e7db1ea976665612ebb4ec8cf8e12d9f0 (patch)
tree4cfb220c84ee287c2292d4f7468831b5beec3405 /options.cpp
parentd51c050a305031806cf5a442ea7608f96353578d (diff)
modified: main.cpp
modified: options.cpp
Diffstat (limited to 'options.cpp')
-rw-r--r--options.cpp38
1 files changed, 8 insertions, 30 deletions
diff --git a/options.cpp b/options.cpp
index d0aadfc..dfbe50f 100644
--- a/options.cpp
+++ b/options.cpp
@@ -871,42 +871,18 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
if(hContact && hwndList_p)
ListView_SetItemText(hwndList_p, item_num, 1, tmp);
mir_free(tmp);
- s2+=2;
s = output.find("“", s2);
if(s == string::npos)
- s = output.find("\"", s2);
- s+=1;
- if(s != s2-1)
{
- tmp2 = new char [output.substr(s2,s-s2).length()+1];
- strcpy(tmp2, output.substr(s2,s-s2).c_str());
- mir_utf8decode(tmp2, 0);
- if(hContact)
- {
- if(isProtoMetaContacts(hContact))
- {
- HANDLE hcnt = NULL;
- if(allsubcontacts)
- {
- int count = metaGetContactsNum(hContact);
- for(int i = 0; i < count; i++)
- {
- hcnt = metaGetSubcontact(hContact, i);
- if(hcnt)
- DBWriteContactSettingString(hcnt, szGPGModuleName, "KeyType", output.substr(s2,s-s2).c_str());
- }
- }
- else
- DBWriteContactSettingString(metaGetMostOnline(hContact), szGPGModuleName, "KeyType", output.substr(s2,s-s2).c_str());
- }
- else
- DBWriteContactSettingString(hContact, szGPGModuleName, "KeyType", output.substr(s2,s-s2).c_str());
- }
- mir_free(tmp2);
+ s = output.find("\"", s2);
+ s += 1;
}
- s+=2;
+ else
+ s += 3;
if((s2 = output.find("(", s)) == string::npos)
s2 = output.find("<", s);
+ else if(s2 > output.find("<", s))
+ s2 = output.find("<", s);
tmp2 = new char [output.substr(s,s2-s-1).length()+1];
strcpy(tmp2, output.substr(s,s2-s-1).c_str());
mir_utf8decode(tmp2, 0);
@@ -938,6 +914,8 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
mir_free(tmp);
if((s = output.find(")", s2)) == string::npos)
s = output.find(">", s2);
+ else if(s > output.find(">", s2))
+ s = output.find(">", s2);
s2++;
if(output[s] == ')')
{