]> 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 2f48ee532b42d43b064c5dd54f5a55b2c1efb8cb..4eadeb4457cf58da212d7aeed1c26ade8bfccc5d 100644 (file)
--- a/mdfrm.c
+++ b/mdfrm.c
@@ -50,6 +50,7 @@ scan_message(char *filename, char *fromheader, char *subjheader)
     }
 
     fromcount = subjcount = 0;
     }
 
     fromcount = subjcount = 0;
+    fromheader[0] = subjheader[0] = '\0';
     while ((line = fgetln(file, &len))) {
         if (len <= 1) {
             break;
     while ((line = fgetln(file, &len))) {
         if (len <= 1) {
             break;