diff --git a/src/progressBar.cpp b/src/progressBar.cpp index 64c1c17..4a015ec 100644 --- a/src/progressBar.cpp +++ b/src/progressBar.cpp @@ -43,7 +43,9 @@ void ProgressBar::display(int value, char force) fputc('=', stderr); } fprintf(stderr, "%*s", (int)(_progressLen-nbEq), ""); - printInfo("] " + std::to_string(percent) + "%", false); + char perc_str[11]; + snprintf(perc_str, sizeof(perc_str), "] %3.2f%%", percent); + printInfo(perc_str, false); } void ProgressBar::done() {