From: Mark Wooding Date: Fri, 25 Mar 2022 01:19:01 +0000 (+0000) Subject: multiprogress.c (clear_progress): Write the `n - 1' loops in a better way. X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/commitdiff_plain/d0f0b99662037f1d87d23c8742358768ac319906 multiprogress.c (clear_progress): Write the `n - 1' loops in a better way. --- diff --git a/multiprogress.c b/multiprogress.c index b4d1193..4d4ae3e 100644 --- a/multiprogress.c +++ b/multiprogress.c @@ -427,9 +427,9 @@ static int clear_progress(struct progress_state *progress, nleave = progress->last_lines - ndel; } if (!ndel) - for (i = 0; i < nleave - 1; i++) put_sequence(tty, tty->cap.up, 1); + for (i = 1; i < nleave; i++) put_sequence(tty, tty->cap.up, 1); else { - for (i = 0; i < ndel - 1; i++) put_sequence(tty, tty->cap.up, 1); + for (i = 1; i < ndel; i++) put_sequence(tty, tty->cap.up, 1); put_sequence(tty, tty->cap.cd, ndel); for (i = 0; i < nleave; i++) put_sequence(tty, tty->cap.up, 1); }