diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-08-04 00:36:45 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-08-04 00:36:45 +0200 |
commit | e8f2f8600ea194ded76e17a6875e1b1848e834cc (patch) | |
tree | d89139a7ea5b97c5841acd611da8c131ba6cb033 | |
parent | 4019edcc5e23b9be9ba0a6dd33d1c841cbc38ca3 (diff) |
SaveThisMsg: return 0 on sscanf() error
-rw-r--r-- | FICS/playerdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index 83bd16a..b301b99 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -2436,8 +2436,10 @@ SaveThisMsg(int which, char *line) if (which == 0) return 1; - if (sscanf(line, "%19s", Sender) != 1) + if (sscanf(line, "%19s", Sender) != 1) { warnx("%s: failed to read sender"); + return 0; + } if (which < 0) { p1 = (-which) - 1; |