aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/gamedb.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-05-02 22:47:01 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-05-02 22:47:01 +0200
commitbfd9efe4c1fb2df08e716b4d6b3f54689fc0bc08 (patch)
treefdea09b2bd6fdd4eb53165c77c3b4ca579424b6b /FICS/gamedb.c
parent07eb7f4b1121c60e55dce2cbbc1b8fab4681c975 (diff)
Revised game_delete()
Diffstat (limited to 'FICS/gamedb.c')
-rw-r--r--FICS/gamedb.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c
index c4becc7..765f361 100644
--- a/FICS/gamedb.c
+++ b/FICS/gamedb.c
@@ -1157,18 +1157,20 @@ PUBLIC int game_read(int g, int wp, int bp)
return 0;
}
-PUBLIC int game_delete(int wp, int bp)
+PUBLIC int
+game_delete(int wp, int bp)
{
- char fname[MAX_FILENAME_SIZE];
- char lname[MAX_FILENAME_SIZE];
+ char fname[MAX_FILENAME_SIZE];
+ char lname[MAX_FILENAME_SIZE];
- sprintf(fname, "%s/%c/%s-%s", adj_dir, parray[wp].login[0],
- parray[wp].login, parray[bp].login);
- sprintf(lname, "%s/%c/%s-%s", adj_dir, parray[bp].login[0],
- parray[wp].login, parray[bp].login);
- unlink(fname);
- unlink(lname);
- return 0;
+ msnprintf(fname, sizeof fname, "%s/%c/%s-%s", adj_dir,
+ parray[wp].login[0], parray[wp].login, parray[bp].login);
+ msnprintf(lname, sizeof lname, "%s/%c/%s-%s", adj_dir,
+ parray[bp].login[0], parray[wp].login, parray[bp].login);
+
+ unlink(fname);
+ unlink(lname);
+ return 0;
}
void