aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
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);