summary refs log tree commit diff
path: root/export.c
diff options
context:
space:
mode:
Diffstat (limited to 'export.c')
-rw-r--r--export.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/export.c b/export.c
index 1b6d298..f060c0b 100644
--- a/export.c
+++ b/export.c
@@ -231,11 +231,15 @@ static int exportHTMLBody(
 				&part->parts.ptr[i], dataCheck(body, List).list.ptr[i]
 			);
 		}
-		return exportHTMLBody(
+		struct Data num = { .type = Number, .number = part->parts.len };
+		listPush(section, num);
+		int error = exportHTMLBody(
 			file, envelope, section,
 			&part->parts.ptr[part->parts.len - 1],
 			dataCheck(body, List).list.ptr[part->parts.len - 1]
 		);
+		section->len--;
+		return error;
 
 	} else if (part->multipart) {
 		int error;