diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-07-18 12:32:14 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-07-18 12:32:14 +0200 |
commit | 9a4af82f902e0607eb085cd2ef0392389ea0ba8b (patch) | |
tree | a5a19e70485b76e6ae6f4d911ed11bbfaaea41fa /FICS/gamedb.c | |
parent | 61fee33e3e8015d80f4df6da664718eb89faa0df (diff) |
Handle the return of sscanf()
Diffstat (limited to 'FICS/gamedb.c')
-rw-r--r-- | FICS/gamedb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c index 639dd46..8584885 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -1690,7 +1690,8 @@ write_g_out(int g, char *file, int maxlines, int isDraw, char *EndSymbol, if (fp) { while (!feof(fp)) fgets(tmp, 1024, fp); - sscanf(ptmp, "%d", &count); + if (sscanf(ptmp, "%d", &count) != 1) + warnx("%s: failed to read 'count'", __func__); fclose(fp); } |