]> diplodocus.org Git - mdfrm/commitdiff
(scan_message): Initialize the first character of fromheader and
authorepg <>
Fri, 24 Jan 2003 03:31:35 +0000 (03:31 +0000)
committerepg <>
Fri, 24 Jan 2003 03:31:35 +0000 (03:31 +0000)
subjheader to '\0' so that they will appear as empty strings when that
header is missing from the message.  Previously, the previous's
message's contents for that header was printed instead of nothing.

mdfrm.c

diff --git a/mdfrm.c b/mdfrm.c
index 2f48ee5..4eadeb4 100644 (file)
--- a/mdfrm.c
+++ b/mdfrm.c
@@ -50,6 +50,7 @@ scan_message(char *filename, char *fromheader, char *subjheader)
     }
 
     fromcount = subjcount = 0;
+    fromheader[0] = subjheader[0] = '\0';
     while ((line = fgetln(file, &len))) {
         if (len <= 1) {
             break;