From 0409e1f7a2ddc1ca1c795824d374374789085831 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 8 Jun 2011 20:26:28 +0200 Subject: [PATCH] Fix crash at end of Swiss tourney --- backend.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 4fba970..4ec6313 100644 --- a/backend.c +++ b/backend.c @@ -7154,6 +7154,8 @@ TourneyStandings(int display) int score[MAXPLAYERS], ranking[MAXPLAYERS], points[MAXPLAYERS], games[MAXPLAYERS]; char result, *p, *names[MAXPLAYERS]; + if(appData.tourneyType < 0 && !strchr(appData.results, '*')) + return strdup(_("Swiss tourney finished")); // standings of Swiss yet TODO names[0] = p = strdup(appData.participants); while(p = strchr(p, '\n')) *p++ = NULLCHAR, names[++nPlayers] = p; // count participants @@ -7176,7 +7178,6 @@ TourneyStandings(int display) games[b]++; nr++; } - if(appData.tourneyType < 0) return strdup("Swiss tourney finished"); // standings of Swiss yet TODO if(appData.tourneyType > 0) nPlayers = appData.tourneyType; // in gauntlet, list only gauntlet engine(s) for(w=0; w