diff options
Diffstat (limited to 'options.cpp')
-rw-r--r-- | options.cpp | 38 |
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] == ')') { |