From e84a8ddf985371fcc961c23a18cd4c088a00c563 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Wed, 30 Sep 2009 19:34:55 +0200 Subject: [PATCH] set max progressbar width to screen width --- src/status.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/status.cpp b/src/status.cpp index ba68f6da..4a1c9793 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -610,7 +610,8 @@ void DrawProgressbar(unsigned elapsed, unsigned time) mvwhline(wFooter->Raw(), 0, 0, 0, wFooter->GetWidth()); if (time) { - for (unsigned i = 0; i < howlong; ++i) + unsigned pb_width = std::min(size_t(howlong), wFooter->GetWidth()); + for (unsigned i = 0; i < pb_width; ++i) *wFooter << Config.progressbar[0]; if (howlong < wFooter->GetWidth()) *wFooter << Config.progressbar[1];