diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-05 05:56:53 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-05 05:56:53 -0700 |
commit | f2923a29cffcfd866ef929518f753f4cd4dee9ec (patch) | |
tree | 2b8ad22d0edea239b4c930e2dfc57011b3d552b6 | |
parent | 3af49338f8ef444bfb524938ba15fa9dc56082c6 (diff) | |
download | dartboat-f2923a29cffcfd866ef929518f753f4cd4dee9ec.tar.gz dartboat-f2923a29cffcfd866ef929518f753f4cd4dee9ec.tar.xz |
web: allocate space for header elems
-rw-r--r-- | web/web_scoreboard.c | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |