diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-06 04:06:16 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-06 04:06:16 -0700 |
commit | f1c451bafb2dd4a3c61cbb2072b5d5ffe5726842 (patch) | |
tree | b01abfd1f9be37d68153e5715dda19e24d661259 /web/web_scoreboard.c | |
parent | 923b945be41739c109b5452567a521fa03c44498 (diff) | |
download | dartboat-f1c451bafb2dd4a3c61cbb2072b5d5ffe5726842.tar.gz dartboat-f1c451bafb2dd4a3c61cbb2072b5d5ffe5726842.tar.xz |
web: move scroll ellipses to CSS where they belong
Diffstat (limited to 'web/web_scoreboard.c')
-rw-r--r-- | web/web_scoreboard.c | 16 |
1 files changed, 8 insertions, 8 deletions
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); |