From: epg <> Date: Fri, 24 Jan 2003 03:31:35 +0000 (+0000) Subject: (scan_message): Initialize the first character of fromheader and X-Git-Url: https://diplodocus.org/git/mdfrm/commitdiff_plain/0f89f6cb9039315c06af880f4983341edd2a2421?ds=sidebyside;hp=8a12cfd2105f0e59a32f6e903157db043dce8d92 (scan_message): Initialize the first character of fromheader and 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. --- diff --git a/mdfrm.c b/mdfrm.c index 2f48ee5..4eadeb4 100644 --- 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;