Browse Source

General: Fix unset variable errors

Dylan Araps 8 years ago
parent
commit
7fae8044f0
1 changed files with 4 additions and 4 deletions
  1. 4 4
      neofetch

+ 4 - 4
neofetch

@@ -3064,12 +3064,12 @@ set_text_colors() {
         info_color="$reset"
         info_color="$reset"
 
 
         # If the ascii art uses 8 as a color, make the text the fg.
         # If the ascii art uses 8 as a color, make the text the fg.
-        (($1 == 8)) && title_color="$reset"
-        (($2 == 8)) && subtitle_color="$reset"
+        ((${1:-1} == 8)) && title_color="$reset"
+        ((${2:-7} == 8)) && subtitle_color="$reset"
 
 
         # If the second color is white use the first for the subtitle.
         # If the second color is white use the first for the subtitle.
-        (($2 == 7)) && subtitle_color="$(color "$1")"
-        (($1 == 7)) && title_color="$reset"
+        ((${2:-7} == 7)) && subtitle_color="$(color "$1")"
+        ((${1:-1} == 7)) && title_color="$reset"
     else
     else
         title_color="$(color "${colors[0]}")"
         title_color="$(color "${colors[0]}")"
         at_color="$(color "${colors[1]}")"
         at_color="$(color "${colors[1]}")"