aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/comproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/comproc.c')
-rw-r--r--FICS/comproc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c
index c48c068..539a60d 100644
--- a/FICS/comproc.c
+++ b/FICS/comproc.c
@@ -191,9 +191,8 @@ com_news(int p, param_list param)
while (!feof(fp) && !found) {
junkp = junk;
- fgets(junk, MAX_LINE_SIZE, fp);
- if (feof(fp))
+ if (fgets(junk, sizeof junk, fp) == NULL || feof(fp))
break;
sscanf(junkp, "%ld %s", &lval, count);