summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/stdio-frontend.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-01-30 13:29:27 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-01-30 13:29:27 +0000
commitdb5240f340a6baa57f9e8ddd6200ac209d3b1a5c (patch)
tree16b6a96426dc07e727a0e650a8b3c912f477703b /mdk-stage1/stdio-frontend.c
parentf9b076d0140b1ac917dad96b16c8a2bfe8ee8732 (diff)
downloaddrakx-backup-do-not-use-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar
drakx-backup-do-not-use-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar.gz
drakx-backup-do-not-use-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar.bz2
drakx-backup-do-not-use-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar.xz
drakx-backup-do-not-use-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.zip
prevent from trying to set progressbar to more than 100% (rescue is more compressed than drakx)
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);