aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/body.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/body.cpp b/src/body.cpp
index 85968330..9d7d57f9 100644
--- a/src/body.cpp
+++ b/src/body.cpp
@@ -197,6 +197,11 @@ void body::parse(const string& buffer, const string::size_type position,
{
ref <bodyPart> part = vmime::create <bodyPart>();
+ // End before start may happen on empty bodyparts (directly
+ // successive boundaries without even a line-break)
+ if (partEnd < partStart)
+ std::swap(partStart, partEnd);
+
part->parse(buffer, partStart, partEnd, NULL);
part->m_parent = m_part;