summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
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
parentf9b076d0140b1ac917dad96b16c8a2bfe8ee8732 (diff)
downloaddrakx-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar
drakx-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar.gz
drakx-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar.bz2
drakx-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.tar.xz
drakx-db5240f340a6baa57f9e8ddd6200ac209d3b1a5c.zip
prevent from trying to set progressbar to more than 100% (rescue is more compressed than drakx)
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/newt-frontend.c3
-rw-r--r--mdk-stage1/stdio-frontend.c9
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);