From 70f1c4fc7baec461c33828d921805c35d3dbb0d5 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Thu, 18 Jul 2024 18:20:14 +0200 Subject: Handle the return value of ReadV1GameFmt() --- FICS/gamedb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'FICS/gamedb.c') diff --git a/FICS/gamedb.c b/FICS/gamedb.c index 1f4e577..ee71af4 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -1293,9 +1293,10 @@ ReadGameAttrs(FILE *fp, char *fname, int g) warn("%s: failed to get version", __func__); } - if (version > 0) - ReadV1GameFmt(&garray[g], fp, fname, version); - else { + if (version > 0) { + if (ReadV1GameFmt(&garray[g], fp, fname, version) == -1) + return -1; + } else { do { if ((len = strlen(line)) <= 1) { fgets(line, sizeof line, fp); -- cgit v1.2.3