aboutsummaryrefslogtreecommitdiffhomepage
path: root/set_color.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-10-17 01:25:21 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-10-17 01:25:21 -0700
commit469743cd230e884be047abe9d8d8338efbb16c0f (patch)
treeb0233898e24a79eb92688b06fc7a84b8fd994c5b /set_color.cpp
parent91e1d598695d9b4ed6e1b5b32e035155e611bc89 (diff)
Made set_color with no arguments not complain, so that prompts like Terlar don't produce errors for missing colors.
Diffstat (limited to 'set_color.cpp')
-rw-r--r--set_color.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/set_color.cpp b/set_color.cpp
index 667c496c..78799b66 100644
--- a/set_color.cpp
+++ b/set_color.cpp
@@ -182,6 +182,10 @@ static unsigned char index_for_color(rgb_color_t c) {
int main( int argc, char **argv )
{
+ /* Some code passes variables to set_color that don't exist, like $fish_user_whatever. As a hack, quietly return failure. */
+ if (argc <= 1)
+ return EXIT_FAILURE;
+
char *bgcolor=0;
char *fgcolor=0;
bool bold=false;