diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-07-18 18:20:14 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-07-18 18:20:14 +0200 |
commit | 70f1c4fc7baec461c33828d921805c35d3dbb0d5 (patch) | |
tree | ca2d7f2b536c24aaf822cecb57a783006bc33ebe | |
parent | 0dd895db018b06041693d550618ab2289269a717 (diff) |
Handle the return value of ReadV1GameFmt()
-rw-r--r-- | FICS/gamedb.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); |