From: Michael Stapelberg Date: Thu, 1 Oct 2009 10:29:27 +0000 (+0200) Subject: Bugfix: parser: Correctly generate colorpixels from hex codes X-Git-Tag: 3.d~55 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f72161d0c209317f33e0d14a6e6fd807db8221e8;p=i3%2Fi3 Bugfix: parser: Correctly generate colorpixels from hex codes --- diff --git a/src/cfgparse.y b/src/cfgparse.y index 8a358454..4cb82998 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -493,7 +493,14 @@ color: ; colorpixel: - '#' HEX { $$ = get_colorpixel(global_conn, $2); } + '#' HEX + { + char *hex; + if (asprintf(&hex, "#%s", $2) == -1) + die("asprintf()"); + $$ = get_colorpixel(global_conn, hex); + free(hex); + } ;