From 1b0f244509a2530d4057b237e264cd20c1b04fa6 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 21 Jan 2013 12:34:22 +0100 Subject: [PATCH] Fixed a bug in memtest progress bar, that had no actual effects. This closes issue #859, thanks to @erbenmo. --- src/memtest.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/memtest.c b/src/memtest.c index 56162ff4..a0b99f98 100644 --- a/src/memtest.c +++ b/src/memtest.c @@ -78,10 +78,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); }