]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - gui.c
gui: Initialize command_fds to -1.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index 2a0174b8e92e7dfa9ff0c4fee7f8929b9cbb7b20..4246eb11e51b03417520eee9bdbc2bf0f2f563fe 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -56,7 +56,7 @@ static unsigned scroll_position;
 static int curses_active;
 static pid_t cmd_pid;
 
-static int command_fds[2];
+static int command_fds[2] = {-1, -1};
 static int stat_pipe = -1;
 static struct gui_args_info conf;
 
@@ -361,7 +361,7 @@ __printf_2_3 static void print_in_bar(int color, const char *fmt,...)
        xvasprintf(&msg, fmt, ap);
        va_end(ap);
        wmove(in.win, 0, 0);
-       align_str(in.win, msg, sb.cols, LEFT);
+       align_str(in.win, msg, in.cols, LEFT);
        free(msg);
        wrefresh(in.win);
 }