Fix incorrect condition for creating client name, from Vlad Apostol in

GitHub issue 4911.
This commit is contained in:
nicm
2026-03-05 22:50:14 +00:00
parent 1e208abd93
commit 41bddae907

View File

@@ -3712,7 +3712,7 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg)
c->term_name = xstrdup("unknown");
}
if (c->ttyname == NULL || *c->ttyname != '\0')
if (c->ttyname != NULL && *c->ttyname != '\0')
name = xstrdup(c->ttyname);
else
xasprintf(&name, "client-%ld", (long)c->pid);