Do not try to append zero size cells, from Uzair Aftab.

This commit is contained in:
nicm
2026-08-31 07:42:56 +00:00
committed by tmux update bot
parent 39357c829c
commit 6a1ecdcce3

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window-copy.c,v 1.427 2026/08/31 07:41:48 nicm Exp $ */
/* $OpenBSD: window-copy.c,v 1.428 2026/08/31 07:42:56 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -4301,7 +4301,7 @@ window_copy_stringify(struct grid *gd, u_int py, u_int first, u_int last,
}
if (dlen == 1)
buf[bx++] = *d;
else {
else if (dlen != 0) {
memcpy(buf + bx, d, dlen);
bx += dlen;
}