Manually applies latest commit from master
This commit is contained in:
parent
585d1633fb
commit
3d64addd45
6
bar.c
6
bar.c
|
@ -295,9 +295,9 @@ parse_color (const char *str, char **end, const uint32_t def)
|
||||||
if (a == 0) {
|
if (a == 0) {
|
||||||
r = g = b = 0;
|
r = g = b = 0;
|
||||||
} else {
|
} else {
|
||||||
r = (r * 255) / a;
|
r = (r * a) / 255;
|
||||||
g = (g * 255) / a;
|
g = (g * a) / 255;
|
||||||
b = (b * 255) / a;
|
b = (b * a) / 255;
|
||||||
|
|
||||||
/* Clamp on overflow */
|
/* Clamp on overflow */
|
||||||
if (r > 255) r = 255;
|
if (r > 255) r = 255;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user