aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/ratings.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/ratings.c')
-rw-r--r--FICS/ratings.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/FICS/ratings.c b/FICS/ratings.c
index 05cd0b4..f69546b 100644
--- a/FICS/ratings.c
+++ b/FICS/ratings.c
@@ -1976,21 +1976,18 @@ DisplayRankedPlayers(int p, int start, int end, int show, int showComp)
num = 100;
if (CheckFlag(show, SHOW_BLITZ)) {
- GetRankFileName(Path, sizeof Path, TYPE_BLITZ);
-
- if ((fb = fopen(Path, "r")) == NULL)
+ if (GetRankFileName(Path, sizeof Path, TYPE_BLITZ) >= 0 &&
+ (fb = fopen(Path, "r")) == NULL)
ClearFlag(show, SHOW_BLITZ);
}
if (CheckFlag(show, SHOW_STANDARD)) {
- GetRankFileName(Path, sizeof Path, TYPE_STAND);
-
- if ((fs = fopen(Path, "r")) == NULL)
+ if (GetRankFileName(Path, sizeof Path, TYPE_STAND) >= 0 &&
+ (fs = fopen(Path, "r")) == NULL)
ClearFlag(show, SHOW_STANDARD);
}
if (CheckFlag(show, SHOW_WILD)) {
- GetRankFileName(Path, sizeof Path, TYPE_WILD);
-
- if ((fw = fopen(Path, "r")) == NULL)
+ if (GetRankFileName(Path, sizeof Path, TYPE_WILD) >= 0 &&
+ (fw = fopen(Path, "r")) == NULL)
ClearFlag(show, SHOW_WILD);
}