]> git.ipfire.org Git - thirdparty/git.git/blobdiff - imap-send.c
t1010-mktree: Adjust expected result to code and documentation
[thirdparty/git.git] / imap-send.c
index 5631930bc3462c5d85d29e7e840f1cf24cd7111b..379dec491f63c24406644c40f94390a021519ddb 100644 (file)
@@ -1306,8 +1306,14 @@ static int count_messages(struct msg_data *msg)
 
        while (1) {
                if (!prefixcmp(p, "From ")) {
+                       p = strstr(p+5, "\nFrom: ");
+                       if (!p) break;
+                       p = strstr(p+7, "\nDate: ");
+                       if (!p) break;
+                       p = strstr(p+7, "\nSubject: ");
+                       if (!p) break;
+                       p += 10;
                        count++;
-                       p += 5;
                }
                p = strstr(p+5, "\nFrom ");
                if (!p)