summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/stdio-frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/stdio-frontend.c')
-rw-r--r--mdk-stage1/stdio-frontend.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mdk-stage1/stdio-frontend.c b/mdk-stage1/stdio-frontend.c
index 277c47da1..85b8c94ad 100644
--- a/mdk-stage1/stdio-frontend.c
+++ b/mdk-stage1/stdio-frontend.c
@@ -146,10 +146,11 @@ void init_progression(char *msg, int size)
void update_progression(int current_size)
{
if (size_progress) {
- while ((int)((current_size*PROGRESS_SIZE)/size_progress) > actually_drawn) {
- printf("*");
- actually_drawn++;
- }
+ if (current_size <= size_progress)
+ while ((int)((current_size*PROGRESS_SIZE)/size_progress) > actually_drawn) {
+ printf("*");
+ actually_drawn++;
+ }
} else
printf("\033[G%d bytes read", current_size);