From: Michael Tremer Date: Mon, 2 Oct 2023 10:12:06 +0000 (+0000) Subject: cli: progressbar: Increment the size of the bar buffer X-Git-Tag: 0.9.30~1574 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60846be9c640cce7489ec45942ed743177d6614f;p=pakfire.git cli: progressbar: Increment the size of the bar buffer Signed-off-by: Michael Tremer --- diff --git a/src/cli/lib/progressbar.c b/src/cli/lib/progressbar.c index 08bb02f08..709707c6d 100644 --- a/src/cli/lib/progressbar.c +++ b/src/cli/lib/progressbar.c @@ -363,7 +363,7 @@ static int cli_progressbar_add_percentage(struct cli_progressbar* p) { static const char* cli_progressbar_bar(struct cli_progressbar* p, struct cli_progressbar_widget* widget, unsigned int width, void* data) { // Allocate or adjust the buffer - widget->buffer = realloc(widget->buffer, width); + widget->buffer = realloc(widget->buffer, width + 1); // Fail if we could not allocate the buffer if (!widget->buffer)