From a16706982141c48a0de0429dcb3283410382b90e Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 31 Dec 2023 21:27:29 +0100 Subject: player_pend_print: initialized the char buffers and got rid of a strcpy() call --- FICS/playerdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FICS/playerdb.c b/FICS/playerdb.c index 19c42c9..3b28e6a 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -1479,8 +1479,8 @@ player_lastdisconnect(int p) PUBLIC void player_pend_print(int p, pending *pend) { - char outstr[200]; - char tmp[200]; + char outstr[200] = { '\0' }; + char tmp[200] = { '\0' }; if (p == pend->whofrom) { sprintf(outstr, "You are offering "); @@ -1489,7 +1489,7 @@ player_pend_print(int p, pending *pend) } if (p == pend->whoto) { - strcpy(tmp, ""); + /* null */; } else { sprintf(tmp, "%s ", parray[pend->whoto].name); } -- cgit v1.2.3