From 5c6a18ec2f9096b0539732c503b22bcec56f13fd Mon Sep 17 00:00:00 2001 From: gyboth Date: Wed, 26 Nov 2008 19:27:00 +0000 Subject: [PATCH] Multiple tables fix. --- src/cup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cup.c b/src/cup.c index 7eeccb14..bdfaf721 100644 --- a/src/cup.c +++ b/src/cup.c @@ -440,7 +440,10 @@ cup_load_choose_team_from_league(Cup *cup, const League *league, Table *table; number_of_teams = 0; - table = &g_array_index(league->tables, Table, ct->from_table); + if(league->tables->len == 0) + table = &g_array_index(league->tables, Table, 0); + else + table = &g_array_index(league->tables, Table, ct->from_table); if(ct->number_of_teams == -1) {