From a946521729dfab48fba77cfd5b3f5295e893ce2a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 14 Feb 2011 11:28:50 -0500 Subject: [PATCH] Truncate the buffer at buf.len before printing in the non-wordwrap case. --HG-- branch : 1.7 --- lbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lbuf.c b/lbuf.c index a5e67bf91..d5adfdc1d 100644 --- a/lbuf.c +++ b/lbuf.c @@ -286,6 +286,7 @@ lbuf_print(lbuf) /* For very small widths just give up... */ if (lbuf->cols <= lbuf->indent + contlen + 20) { + lbuf->buf[lbuf->len] = '\0'; lbuf->output(lbuf->buf); goto done; } -- 2.40.0