diff options
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r-- | libqpdf/QPDFWriter.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 447b6627..30ba6f1f 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -3357,9 +3357,10 @@ QPDFWriter::indicateProgress(bool decrement, bool finished) this->m->events_expected))); this->m->progress_reporter->reportProgress(percentage); } + int increment = std::max(1, (this->m->events_expected / 100)); while (this->m->events_seen >= this->m->next_progress_report) { - this->m->next_progress_report += (this->m->events_expected / 100); + this->m->next_progress_report += increment; } } |