From 3e9c27de289572346f1fb672408187058e32d571 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Mon, 13 Dec 2021 10:45:39 +0100 Subject: [PATCH] Contrained actual prefix len --- src/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.cpp b/src/utils.cpp index 7080c81..fa7ad33 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -43,7 +43,7 @@ void term::progress(int prefixlen, int steps = round(cur * maxsteps / total); int perc = round(100 * cur / total); int fill_len = barwidth - steps / 8; - *_out << '\r' << std::setw(prefixlen) << prefix << ' '; + *_out << '\r' << std::setw(prefixlen) << prefix.substr(0, prefixlen) << ' '; grayf(8); for (int i = 0; i < steps / 8; ++i) { *_out << bar[7];