summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/static/style.css1
-rw-r--r--web/web_scoreboard.c16
2 files changed, 9 insertions, 8 deletions
diff --git a/web/static/style.css b/web/static/style.css
index 51dac74..9eeb337 100644
--- a/web/static/style.css
+++ b/web/static/style.css
@@ -371,6 +371,7 @@ div#visits .p100 { color: #78c018; }
div#visits .p140 { color: #20e018; }
div#visits .p180 { color: #20e018; font-weight: bold; }
div#visits .visit-col6 { color: #666; justify-content: left; font-family: monospace; white-space: pre; }
+div#visits .visit-col6:not(:empty):before { content: '…'; }
.modal {
background-color: #000a;
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);