Fix bug in progress info, count last written bytes in percent.
This commit is contained in:
parent
48e243d5da
commit
c786fc70b6
@ -965,11 +965,13 @@ int iso_write(Ecma119Image *target, void *buf, size_t count)
|
||||
}
|
||||
|
||||
if (ret > 0){
|
||||
unsigned int kbw = (unsigned int) target->bytes_written >> 10;
|
||||
unsigned int kbt = (unsigned int) target->total_size >> 10;
|
||||
int percent = (kbw * 100) / kbt;
|
||||
unsigned int kbw, kbt;
|
||||
int percent;
|
||||
|
||||
target->bytes_written += count;
|
||||
kbw = (unsigned int) target->bytes_written >> 10;
|
||||
kbt = (unsigned int) target->total_size >> 10;
|
||||
percent = (kbw * 100) / kbt;
|
||||
|
||||
/* only report in 5% chunks */
|
||||
if (percent >= target->percent_written + 5) {
|
||||
|
Loading…
Reference in New Issue
Block a user