blob: cf9960cfcedc0190e460326a3a5a5b731d87e2c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
Perform the QRgb to hex conversion in an endian-independent way.
--- kiconthemes-5.116.0/src/kiconloader.cpp.old 2024-05-04 06:40:07.000000000 -0500
+++ kiconthemes-5.116.0/src/kiconloader.cpp 2025-06-30 05:00:25.377715342 -0500
@@ -77,7 +77,8 @@
{
static const char hexLookup[] = "0123456789abcdef";
buffer += 7;
- uchar *colorFields = reinterpret_cast<uchar *>(&colorData);
+ uchar fields[4] = {qBlue(colorData), qGreen(colorData), qRed(colorData), qAlpha(colorData)};
+ uchar *colorFields = &fields[0];
for (int i = 0; i < 4; i++) {
*buffer-- = hexLookup[*colorFields & 0xf];
|