Don't write junk to unused bytes of downfil and motdfil

These files don't use all members of struct telstr.  turn() neglected
to initialized the unused ones and struct telstr's holes.  Fix that.
This commit is contained in:
Markus Armbruster 2009-02-07 19:49:21 +01:00
parent fe9f02ccfb
commit f465b1e1e2

View file

@ -107,6 +107,7 @@ turn(void)
if (msgfilepath == downfil)
pr("Logins disabled.\n");
memset(&tgm, 0, sizeof(tgm));
if ((fwrite(&tgm, sizeof(tgm), 1, fptr) != 1) ||
(fwrite(msgbuf, tgm.tel_length, 1, fptr) != 1)) {
fclose(fptr);