Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2024-11-25 14:01:12 +00:00
commit db978db271

View File

@ -3843,17 +3843,21 @@ server_client_print(struct client *c, int parse, struct evbuffer *evb)
size_t size = EVBUFFER_LENGTH(evb); size_t size = EVBUFFER_LENGTH(evb);
struct window_pane *wp; struct window_pane *wp;
struct window_mode_entry *wme; struct window_mode_entry *wme;
char *sanitized, *msg, *line; char *sanitized, *msg, *line, empty = '\0';
if (!parse) { if (!parse) {
utf8_stravisx(&msg, data, size, utf8_stravisx(&msg, data, size,
VIS_OCTAL|VIS_CSTYLE|VIS_NOSLASH); VIS_OCTAL|VIS_CSTYLE|VIS_NOSLASH);
log_debug("%s: %s", __func__, msg);
} else { } else {
msg = EVBUFFER_DATA(evb); if (size == 0)
if (msg[size - 1] != '\0') msg = ∅
evbuffer_add(evb, "", 1); else {
msg = EVBUFFER_DATA(evb);
if (msg[size - 1] != '\0')
evbuffer_add(evb, "", 1);
}
} }
log_debug("%s: %s", __func__, msg);
if (c == NULL) if (c == NULL)
goto out; goto out;