aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/command.c')
-rw-r--r--FICS/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/FICS/command.c b/FICS/command.c
index 80462da..a2d61f9 100644
--- a/FICS/command.c
+++ b/FICS/command.c
@@ -727,7 +727,8 @@ check_news(int p, int admin)
time_t lc = player_lastconnect(p);
if (admin) {
- sprintf(filename, "%s/newadminnews.index", news_dir);
+ msnprintf(filename, sizeof filename, "%s/newadminnews.index",
+ news_dir);
if ((fp = fopen(filename, "r")) == NULL) {
fprintf(stderr, "Can't find admin news index.\n");
@@ -763,7 +764,8 @@ check_news(int p, int admin)
"admin news file)\n", num_anews);
}
} else {
- sprintf(filename, "%s/newnews.index", news_dir);
+ msnprintf(filename, sizeof filename, "%s/newnews.index",
+ news_dir);
if ((fp = fopen(filename, "r")) == NULL) {
fprintf(stderr, "Can't find news index.\n");