aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-11-28 06:33:47 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-11-28 06:33:47 +0100
commitd6a42c0544b127cb6f596c5aa0db5e6370474711 (patch)
tree2cfb7756845fe5cc36cd30d5fe5b6aaaf14d7a93 /FICS
parent61340a99b0cdb37a3d200b90ee2b061ebb7e118c (diff)
ShowRankLines: added null checks
Diffstat (limited to 'FICS')
-rw-r--r--FICS/ratings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/FICS/ratings.c b/FICS/ratings.c
index 438941b..ca05908 100644
--- a/FICS/ratings.c
+++ b/FICS/ratings.c
@@ -1709,21 +1709,21 @@ ShowRankLines(int p, FILE *fb, FILE *fs, FILE *fw, int bCount, int sCount,
if (n <= 0)
return 0;
- if (CheckFlag(show, SHOW_BLITZ)) {
+ if (fb != NULL && CheckFlag(show, SHOW_BLITZ)) {
PositionFilePtr(fb, bCount, &lastBlitz, &nTiedBlitz, showComp);
if (feof(fb))
ClearFlag(show, SHOW_BLITZ);
}
- if (CheckFlag(show, SHOW_STANDARD)) {
+ if (fs != NULL && CheckFlag(show, SHOW_STANDARD)) {
PositionFilePtr(fs, sCount, &lastStd, &nTiedStd, showComp);
if (feof(fs))
ClearFlag(show, SHOW_STANDARD);
}
- if (CheckFlag(show, SHOW_WILD)) {
+ if (fw != NULL && CheckFlag(show, SHOW_WILD)) {
PositionFilePtr(fw, wCount, &lastWild, &nTiedWild, showComp);
if (feof(fw))