summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/main.cpp b/main.cpp
index 964f3fb..97bf301 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1334,13 +1334,16 @@ void ImportKey()
s2+=2;
s = output.find("“", s2);
if(s == string::npos)
+ {
s = output.find("\"", s2);
- s+=1;
- if(s != s2-1)
- DBWriteContactSettingString(hContact, szGPGModuleName, "KeyType", output.substr(s2,s-s2).c_str());
- s+=2;
+ s += 1;
+ }
+ else
+ s += 3;
if((s2 = output.find("(", s)) == string::npos)
s2 = output.find("<", s);
+ else if(s2 > output.find("<", s))
+ s2 = output.find("<", s);
tmp = new char [output.substr(s,s2-s-1).length()+1];
strcpy(tmp, output.substr(s,s2-s-1).c_str());
mir_utf8decode(tmp, 0);
@@ -1348,6 +1351,8 @@ void ImportKey()
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] == ')')
{