gui: Remove pointless special casing in align_str().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 28 Feb 2016 21:04:33 +0000 (22:04 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 13 Mar 2016 17:11:32 +0000 (18:11 +0100)
Regardless of whether str[0] is the null byte, passing str is correct
(and done for left and right alignment).

gui.c

diff --git a/gui.c b/gui.c
index 1a89681..e9e9487 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -296,7 +296,7 @@ static int align_str(WINDOW* win, char *str, unsigned int len,
                waddstr(win, str);
        } else {
                add_spaces(win, num / 2);
-               waddstr(win, str[0]? str: "");
+               waddstr(win, str);
                add_spaces(win, num - num / 2);
        }
        return 1;