mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-15 10:21:38 +00:00
wayland: use arithmetic instead of wrong-endian memcpy
this fixes corruption of parsed colors in Wayland-only builds
This commit is contained in:
parent
31b4c27abc
commit
d3e9bcbe71
@ -121,8 +121,7 @@ long manually_get_x11_color(const char *name) {
|
|||||||
|
|
||||||
argb[skip_alpha + i / 2] = val;
|
argb[skip_alpha + i / 2] = val;
|
||||||
}
|
}
|
||||||
long out;
|
long out = (argb[0] << 24) | (argb[1] << 16) | (argb[2] << 8) | argb[3];
|
||||||
memcpy(static_cast<void *>(&out), argb, 4);
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
err:
|
err:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user