]> git.pond.sub.org Git - empserver/blobdiff - src/lib/player/player.c
(gamedown, show_motd): Fix message buffer size. Messages of maximum
[empserver] / src / lib / player / player.c
index 519324220256853288162b58b25dbdc595fa210c..36db62dac347bd45db5f39aeb1090492c651b7d6 100644 (file)
@@ -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;