From f2923a29cffcfd866ef929518f753f4cd4dee9ec Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 5 May 2022 05:56:53 -0700 Subject: web: allocate space for header elems --- web/web_scoreboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c index f5afcc5..71b239d 100644 --- a/web/web_scoreboard.c +++ b/web/web_scoreboard.c @@ -209,7 +209,7 @@ void draw_visits() int n_visits = state->legs[0]->n_visits > state->legs[1]->n_visits ? state->legs[0]->n_visits : state->legs[1]->n_visits; - struct dom_elem **elemv = malloc(6 * n_visits * sizeof(*elemv)); + struct dom_elem **elemv = malloc(6 * (n_visits + 1) * sizeof(*elemv)); int elemc = 0; char buf[32], buf2[32]; -- cgit v1.2.3-70-g09d2