diff --git a/tty-term.c b/tty-term.c index 0490ee11..29dbaf59 100644 --- a/tty-term.c +++ b/tty-term.c @@ -611,7 +611,7 @@ tty_term_create(struct tty *tty, char *name, char **caps, u_int ncaps, if (strcasecmp(envent->value, "truecolor") == 0 || strcasecmp(envent->value, "24bit") == 0) tty_add_features(feat, "RGB", ","); - else if (strstr(s, "256") != NULL) + else if (strstr(envent->value, "256") != NULL) tty_add_features(feat, "256", ","); } diff --git a/window-copy.c b/window-copy.c index 3b0f11dc..137c97b2 100644 --- a/window-copy.c +++ b/window-copy.c @@ -567,8 +567,8 @@ window_copy_vadd(struct window_pane *wp, int parse, const char *fmt, va_list ap) vasprintf(&text, fmt, ap); input_parse_screen(data->ictx, backing, window_copy_init_ctx_cb, data, text, strlen(text)); - free(text); - } else { + free(text); + } else { memcpy(&gc, &grid_default_cell, sizeof gc); screen_write_vnputs(&backing_ctx, 0, &gc, fmt, ap); }