Permalink
Browse files

Fixed a bug in memtest progress bar, that had no actual effects.

This closes issue #859, thanks to @erbenmo.
  • Loading branch information...
1 parent 2f1318a commit 850117a8a5897b3231af3068960c13304f2fdb69 @antirez committed Jan 21, 2013
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/memtest.c
View
@@ -79,10 +79,8 @@ void memtest_progress_end(void) {
void memtest_progress_step(size_t curr, size_t size, char c) {
size_t chars = ((unsigned long long)curr*progress_full)/size, j;
- for (j = 0; j < chars-progress_printed; j++) {
- printf("%c",c);
- progress_printed++;
- }
+ for (j = 0; j < chars-progress_printed; j++) printf("%c",c);
+ progress_printed = chars;
fflush(stdout);
}

0 comments on commit 850117a

Please sign in to comment.