mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-14 10:00:21 +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;
|
||||
}
|
||||
long out;
|
||||
memcpy(static_cast<void *>(&out), argb, 4);
|
||||
long out = (argb[0] << 24) | (argb[1] << 16) | (argb[2] << 8) | argb[3];
|
||||
return out;
|
||||
}
|
||||
err:
|
||||
|
Loading…
x
Reference in New Issue
Block a user