diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2025-03-17 00:41:31 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2025-03-17 00:41:31 +0100 |
commit | 0231eadfe653e5c4ee31c6ba61aff14ae6f5222e (patch) | |
tree | 42fa97932f030c7a41d851817a8f3d0ecf26af37 | |
parent | 4b6075fab1539d3dda52ff9089fb1bb6a98fe81c (diff) |
Changed pmore_file()main
-rw-r--r-- | FICS/utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/FICS/utils.c b/FICS/utils.c index 1435e77..ce02a5d 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -506,9 +506,10 @@ pmore_file(int p) return -1; } - while (!feof(fp) && --lcount > 0) { - if (fgets(tmp, sizeof tmp, fp) != NULL && !feof(fp)) - net_send_string(parray[p].socket, tmp, 1); + while (--lcount > 0) { + if (fgets(tmp, sizeof tmp, fp) == NULL) + break; + net_send_string(parray[p].socket, tmp, 1); } if (!feof(fp)) { |