diff options
author | jaseg <git@jaseg.net> | 2018-07-22 20:43:56 +0200 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2018-07-22 20:43:56 +0200 |
commit | 87248c46ffda6311fa6477ca8de2e37f10a8f0d8 (patch) | |
tree | 0d463577fa5ec15f39963b0cd17971b566432020 /lolcat.c | |
parent | 32c34ab174f1dd93985831926241ed3f20f4d0c7 (diff) | |
download | lolcat-87248c46ffda6311fa6477ca8de2e37f10a8f0d8.tar.gz lolcat-87248c46ffda6311fa6477ca8de2e37f10a8f0d8.tar.bz2 lolcat-87248c46ffda6311fa6477ca8de2e37f10a8f0d8.zip |
Fix variable scope bug
Diffstat (limited to 'lolcat.c')
-rw-r--r-- | lolcat.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |