diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-24 12:37:59 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-24 12:37:59 +0100 |
commit | 452ea290d35f7f264d8636e738cd9c9e9437a916 (patch) | |
tree | 93b265ac6a660bd66df6445acff9de637d29e07e /FICS | |
parent | 9f0e8916aa9e550b69b3fbaf59ae082427cc3f53 (diff) |
Changed RemHist()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/gamedb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c index 22e942b..e436cab 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -1669,15 +1669,14 @@ RemHist(char *who) if ((fp = fopen(fName, "r")) != NULL) { long int iter_no = 0; - while (!feof(fp)) { - // XXX: end the format string with a newline? + while (!feof(fp) && !ferror(fp)) { const int ret = fscanf(fp, "%*d %*c %*d %*c %*d %19s " - "%*s %*d %*d %*d %*d %*s %*s %ld", Opp, &When); + "%*s %*d %*d %*d %*d %*s %*s %ld\n", Opp, &When); if (ret != 2) { warnx("%s: fscanf() error (%s:%ld)", __func__, fName, iter_no); - iter_no++; - continue; +// iter_no++; + break; } stolower(Opp); |