We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c198ca7 commit 78abf3aCopy full SHA for 78abf3a
smithlab_utils.cpp
@@ -226,7 +226,7 @@ smithlab::squash(const std::vector<std::string>& v) {
226
227
void
228
ProgressBar::report(std::ostream &out, const size_t i) {
229
- prev = std::round((100.0*i)/total);
+ prev = std::round((100.0*std::min(i, total))/total);
230
const size_t x =
231
std::min(static_cast<size_t>(bar_width*(prev/100.0)), bar_width);
232
fill_n(begin(bar), x, '=');
0 commit comments