diff options
-rw-r--r-- | mdk-stage1/newt-frontend.c | 3 | ||||
-rw-r--r-- | mdk-stage1/stdio-frontend.c | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c index 640ff9f0c..494751d90 100644 --- a/mdk-stage1/newt-frontend.c +++ b/mdk-stage1/newt-frontend.c @@ -147,7 +147,8 @@ void init_progression(char *msg, int size) void update_progression(int current_size) { if (size_progress) { - newtScaleSet(scale, current_size); + if (current_size <= size_progress) + newtScaleSet(scale, current_size); newtRefresh(); } else { 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); |