From 56c2e0e3554482866b3cd08fefb2fc9ad70ca522 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 2 Dec 2024 15:23:33 +0100 Subject: Changed LoadMsgRange() --- FICS/playerdb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/FICS/playerdb.c b/FICS/playerdb.c index 7cc577c..4d2257d 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -2582,9 +2582,7 @@ LoadMsgRange(int p, int start, int end, textlist **Head) } for (n = 1; n <= end || end <= 0; n++) { - fgets(line, sizeof line, fp); - - if (feof(fp)) + if (fgets(line, sizeof line, fp) == NULL) break; if ((start < 0 && (n < -start || n > -end)) || (start >= 0 && n >= start)) { -- cgit v1.2.3