summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/web_scoreboard.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c
index 62b4c0f..3b5993a 100644
--- a/web/web_scoreboard.c
+++ b/web/web_scoreboard.c
@@ -287,9 +287,11 @@ void draw_visits_dense()
int np = match_num_players();
dom_set_style_property_int("--num-players", np);
- // FIXME
- int n_visits = state->legs[0]->n_visits > state->legs[1]->n_visits ?
- state->legs[0]->n_visits : state->legs[1]->n_visits;
+ int n_visits = 0;
+ for (int i = 0; i < np; ++i) {
+ if (state->legs[i]->n_visits > n_visits)
+ n_visits = state->legs[i]->n_visits;
+ }
struct dom_elem **elemv = malloc(
(np * 2 + 1) * (2 * n_visits + 2) * sizeof(*elemv));