]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
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 1a89681d196bce31b863e390bd60fc62f441a886..e9e94873ae28f0963d355fe6d40683f78b6f2f41 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);
        } else {
                add_spaces(win, num / 2);
-               waddstr(win, str[0]? str: "");
+               waddstr(win, str);
                add_spaces(win, num - num / 2);
        }
        return 1;
                add_spaces(win, num - num / 2);
        }
        return 1;