From: H.G. Muller Date: Wed, 8 Jun 2011 18:26:28 +0000 (+0200) Subject: Fix crash at end of Swiss tourney X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0409e1f7a2ddc1ca1c795824d374374789085831;p=xboard.git Fix crash at end of Swiss tourney --- 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