diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 21:27:29 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 21:27:29 +0100 |
commit | a16706982141c48a0de0429dcb3283410382b90e (patch) | |
tree | 396e075b6bf8043b321a66c4c954fc1a2b73e995 /FICS/playerdb.c | |
parent | 09375d0dc634631161a2ed061d27a27bb8adf8ae (diff) |
player_pend_print: initialized the char buffers and got rid of a strcpy() call
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r-- | FICS/playerdb.c | 6 |
1 files 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); } |