From f1c451bafb2dd4a3c61cbb2072b5d5ffe5726842 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 6 May 2022 04:06:16 -0700 Subject: web: move scroll ellipses to CSS where they belong --- web/web_scoreboard.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'web/web_scoreboard.c') diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c index d0a5947..6207d4a 100644 --- a/web/web_scoreboard.c +++ b/web/web_scoreboard.c @@ -212,15 +212,15 @@ void draw_visits() "visit-col5", points_class(v->points)); elemv[elemc++] = create_div(buf, buf2); - char *pbuf = stpcpy(buf, "…"); - for (int j = 0; j < v->n_darts; ++j) { - char *n = segment_name(v->darts[j]); - snprintf(pbuf + (j * 5), - sizeof(buf) - (pbuf + (j * 5) - buf), - " %4s", n); - free(n); + if (v->n_darts) { + for (int j = 0; j < v->n_darts; ++j) { + char *n = segment_name(v->darts[j]); + snprintf(buf + (j * 5), sizeof(buf) - (j * 5), + " %4s", n); + free(n); + } + elemv[elemc++] = create_div(buf, "visit-col6"); } - elemv[elemc++] = create_div(buf, "visit-col6"); } dom_append_elemv("#visits", elemc, elemv); -- cgit v1.2.3-70-g09d2