[libglnx] console: Fix bar progress length



commit 8a7943fef6061a4e9ca368e0042a8a3924affb99
Author: Colin Walters <walters verbum org>
Date:   Mon Feb 8 14:08:09 2016 +0100

    console: Fix bar progress length
    
    The previous fix added the last character of text, but failed to
    account for the space we're adding.

 glnx-console.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glnx-console.c b/glnx-console.c
index 3973311..f9d8baa 100644
--- a/glnx-console.c
+++ b/glnx-console.c
@@ -237,7 +237,7 @@ glnx_console_progress_text_percent (const char *text,
   }
 
   textlen = MIN (input_textlen, ncolumns - bar_min);
-  barlen = ncolumns - textlen;
+  barlen = ncolumns - (textlen + 1);
 
   if (textlen > 0)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]