aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-11-24 12:37:59 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-11-24 12:37:59 +0100
commit452ea290d35f7f264d8636e738cd9c9e9437a916 (patch)
tree93b265ac6a660bd66df6445acff9de637d29e07e /FICS
parent9f0e8916aa9e550b69b3fbaf59ae082427cc3f53 (diff)
Changed RemHist()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/gamedb.c9
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);