diff options
Diffstat (limited to 'FICS/adminproc.c')
-rw-r--r-- | FICS/adminproc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c index ac88afa..bbb0c24 100644 --- a/FICS/adminproc.c +++ b/FICS/adminproc.c @@ -221,9 +221,8 @@ add_item(char *new_item, char *filename) goto end; while (1) { - fgets(junk, MAX_LINE_SIZE, old_fp); - - if (feof(old_fp)) + if (fgets(junk, sizeof junk, old_fp) == NULL || + feof(old_fp)) break; fprintf(new_fp, "%s", junk); } |