Bugfix: parser: Correctly generate colorpixels from hex codes

This commit is contained in:
Michael Stapelberg 2009-10-01 12:29:27 +02:00
parent 6aa0f965d2
commit f72161d0c2

View File

@ -493,7 +493,14 @@ color:
;
colorpixel:
'#' HEX { $<number>$ = get_colorpixel(global_conn, $<string>2); }
'#' HEX
{
char *hex;
if (asprintf(&hex, "#%s", $<string>2) == -1)
die("asprintf()");
$<number>$ = get_colorpixel(global_conn, hex);
free(hex);
}
;