Browse files

printf-utils: Add newline when 100%

  • Loading branch information...
1 parent ab07fec commit 17c6aefdcba894e9f32cc37d268e3945bda2b7c7 @pali pali committed Aug 11, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/printf-utils.c
View
1 src/printf-utils.c
@@ -55,6 +55,7 @@ void printf_progressbar(unsigned long long part, unsigned long long total) {
for(tmp=cols*pc/100;tmp;tmp--) PRINTF_ADD("#");
for(tmp=cols-(cols*pc/100);tmp;tmp--) PRINTF_ADD("-");
PRINTF_ADD("]");
+ if (part == total) PRINTF_END();
fflush(stdout);
#if HAVE_SQUEUE
}

0 comments on commit 17c6aef

Please sign in to comment.