summaryrefslogtreecommitdiff
path: root/web/web_scoreboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_scoreboard.c')
-rw-r--r--web/web_scoreboard.c16
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);