diff --git a/format-draw.c b/format-draw.c index a3bd4351..84af1145 100644 --- a/format-draw.c +++ b/format-draw.c @@ -527,6 +527,7 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base, style_set(&sy, base); TAILQ_INIT(&frs); + log_debug("%s: %s", __func__, expanded); /* * We build three screens for left, right, centre alignment, one for @@ -574,10 +575,13 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base, /* This is a style. Work out where the end is and parse it. */ end = format_skip(cp + 2, "]"); - if (end == NULL) + if (end == NULL) { + log_debug("no terminating ] at '%s'", cp + 2); return; + } tmp = xstrndup(cp + 2, end - (cp + 2)); if (style_parse(&sy, base, tmp) != 0) { + log_debug("invalid style '%s'", tmp); free(tmp); return; }