diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-28 07:18:03 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-28 07:18:03 +0100 |
commit | 77ece1c4cac59a535d45f2ffeb6c95c7a1ed3269 (patch) | |
tree | 941c754c420da0ccb350bc27016f31b605fc9d72 /FICS/makerank.c | |
parent | 3180478d8ed332e004c0d257c91b89d4a2f3a5cf (diff) |
Changed GetPlayerInfo()
Diffstat (limited to 'FICS/makerank.c')
-rw-r--r-- | FICS/makerank.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/FICS/makerank.c b/FICS/makerank.c index 85938ce..00bac38 100644 --- a/FICS/makerank.c +++ b/FICS/makerank.c @@ -75,6 +75,8 @@ GetPlayerInfo(char *fileName, ENTRY *e) fclose(fp); return 0; } + + done = 1; } else { do { sscanf(line, "%s", field); @@ -111,12 +113,13 @@ GetPlayerInfo(char *fileName, ENTRY *e) done = 1; } - fgets(line, sizeof line, fp); + if (fgets(line, sizeof line, fp) == NULL) + break; } while (!done && !feof(fp)); } fclose(fp); - return 1; + return (done ? 1 : 0); } static int |