Skip to content

Commit

Permalink
Fix wrong counting logline when flashing (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilroy42 authored and xor-gate committed Jun 17, 2017
1 parent 79d9178 commit 438344a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ int stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t* base, uint32_t
if (sl->verbose >= 1) {
/* show progress. writing procedure is slow
and previous errors are misleading */
fprintf(stdout, "\r%3u/%lu pages written", write_block_count++, (unsigned long)(len/sl->flash_pgsz));
fprintf(stdout, "\r%3u/%lu pages written", ++write_block_count, (unsigned long)((len+sl->flash_pgsz-1)/sl->flash_pgsz));
fflush(stdout);
}
}
Expand Down

0 comments on commit 438344a

Please sign in to comment.