diff --git a/src/lib/player/empdis.c b/src/lib/player/empdis.c index 56a75163..3d0f5215 100644 --- a/src/lib/player/empdis.c +++ b/src/lib/player/empdis.c @@ -154,7 +154,7 @@ gamedown(void) { FILE *down_fp; struct telstr tgm; - s_char buf[MAXTELSIZE]; /* buf is message text */ + char buf[MAXTELSIZE + 1]; /* message text */ if (player->god) return 0; diff --git a/src/lib/player/player.c b/src/lib/player/player.c index 51932422..36db62da 100644 --- a/src/lib/player/player.c +++ b/src/lib/player/player.c @@ -345,14 +345,12 @@ show_motd(void) { FILE *motd_fp; struct telstr tgm; - char buf[MAXTELSIZE]; + char buf[MAXTELSIZE + 1]; /* message text */ - if ((motd_fp = fopen(motdfil, "rb")) == NULL) - { + if ((motd_fp = fopen(motdfil, "rb")) == NULL) { if (errno == ENOENT) return RET_OK; - else - { + else { pr ("Could not open motd.\n"); logerror("Could not open motd (%s).\n", motdfil); return RET_SYS;