Commit 14a5f595 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent a87dfab6
......@@ -61,9 +61,9 @@ Interface::MessagePart::Ptr ApplicationGnuPGWKSFormatter::process(BodyPart &part
if (subParts.size() == 2
&& partHasMimeType(subParts[0], "text/plain")
&& partHasMimeType(subParts[1], "application/vnd.gnupg.wks")) {
return MimeMessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), part.content()->contents().at(1), false));
return MimeMessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), subParts.at(1), false));
} else {
return MimeMessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), part.content()->contents().at(0), false));
return MimeMessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), subParts.at(0), false));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment