summaryrefslogtreecommitdiff
path: root/lolcat.c
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2018-07-22 20:43:56 +0200
committerjaseg <git@jaseg.net>2018-07-22 20:43:56 +0200
commit87248c46ffda6311fa6477ca8de2e37f10a8f0d8 (patch)
tree0d463577fa5ec15f39963b0cd17971b566432020 /lolcat.c
parent32c34ab174f1dd93985831926241ed3f20f4d0c7 (diff)
downloadlolcat-87248c46ffda6311fa6477ca8de2e37f10a8f0d8.tar.gz
lolcat-87248c46ffda6311fa6477ca8de2e37f10a8f0d8.tar.bz2
lolcat-87248c46ffda6311fa6477ca8de2e37f10a8f0d8.zip
Fix variable scope bug
Diffstat (limited to 'lolcat.c')
-rw-r--r--lolcat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lolcat.c b/lolcat.c
index ad1893b..6e6ffba 100644
--- a/lolcat.c
+++ b/lolcat.c
@@ -74,6 +74,7 @@ void version(){
}
int main(int argc, char **argv){
+ char *default_argv[] = {"-"};
int cc=-1, i, l=0;
wint_t c;
int colors=1;
@@ -115,8 +116,7 @@ int main(int argc, char **argv){
char **inputs = argv+i;
char **inputs_end = argv+argc;
if(inputs == inputs_end){
- char *foo[] = {"-"};
- inputs = foo;
+ inputs = default_argv;
inputs_end = inputs+1;
}