Bugfix: parser: Correctly generate colorpixels from hex codes
This commit is contained in:
parent
6aa0f965d2
commit
f72161d0c2
|
@ -493,7 +493,14 @@ color:
|
||||||
;
|
;
|
||||||
|
|
||||||
colorpixel:
|
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);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue