From cdb450376e52bad45969c87a44908ef6e9997f39 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 26 Sep 2009 13:26:13 +0200 Subject: Bugfix: Don’t show colors in wireless info if colors are disabled (Thanks shatter) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/output.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/output.c') diff --git a/src/output.c b/src/output.c index c153a01..eee458b 100644 --- a/src/output.c +++ b/src/output.c @@ -26,6 +26,10 @@ void write_error_to_statusbar(const char *message) { */ char *color(const char *colorstr) { static char colorbuf[32]; + if (!use_colors) { + colorbuf[0] = '\0'; + return colorbuf; + } #ifdef DZEN (void)snprintf(colorbuf, sizeof(colorbuf), "^fg(%s)", colorstr); #elif XMOBAR -- cgit v1.2.3