From 216162c7ebb95f9ceae633693bb550eea0e77b73 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sat, 31 Aug 2013 16:54:02 +0000 Subject: [PATCH] This is awkward. --- bar.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bar.c b/bar.c index 820a3f8..2c55805 100644 --- a/bar.c +++ b/bar.c @@ -145,13 +145,16 @@ parse (char *text) if (*p == '\\' && p++ && *p != '\\' && strchr ("fbulcr", *p)) { switch (*p++) { case 'f': - xcb_set_fg (!isdigit(*p) ? (*p++)-'0' : 11); + xcb_set_fg (isdigit(*p) ? (*p)-'0' : 11); + p++; break; case 'b': - xcb_set_bg (!isdigit(*p) ? (*p++)-'0' : 10); + xcb_set_bg (isdigit(*p) ? (*p)-'0' : 10); + p++; break; case 'u': - xcb_set_ud (!isdigit(*p) ? (*p++)-'0' : 10); + xcb_set_ud (isdigit(*p) ? (*p)-'0' : 10); + p++; break; case 'l':