]> git.armaanb.net Git - st.git/blobdiff - st.c
Launch scroll program with the default shell
[st.git] / st.c
diff --git a/st.c b/st.c
index 81973eed38d5a2a3a9efdd83d3508eb2ef819438..59db14483a01f4b153ad1d5ddb85253c9ea785bc 100644 (file)
--- a/st.c
+++ b/st.c
@@ -366,7 +366,8 @@ static const char base64_digits[] = {
 char
 base64dec_getc(const char **src)
 {
-       while (**src && !isprint(**src)) (*src)++;
+       while (**src && !isprint(**src))
+               (*src)++;
        return **src ? *((*src)++) : '=';  /* emulate padding if string ends */
 }
 
@@ -681,9 +682,12 @@ execsh(char *cmd, char **args)
        if (args) {
                prog = args[0];
                arg = NULL;
-       } else if (scroll || utmp) {
-               prog = scroll ? scroll : utmp;
-               arg = scroll ? utmp : NULL;
+       } else if (scroll) {
+               prog = scroll;
+               arg = utmp ? utmp : sh;
+       } else if (utmp) {
+               prog = utmp;
+               arg = NULL;
        } else {
                prog = sh;
                arg = NULL;