aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/gamedb.c3
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);
}