Fix strict-aliasing-related UB
This commit is contained in:
parent
b05f993221
commit
faeb0d9395
@ -65,7 +65,10 @@ void applyColorSettings(color_setting_t* cs)
|
|||||||
memset(px, 0, sizeof(px));
|
memset(px, 0, sizeof(px));
|
||||||
|
|
||||||
do {
|
do {
|
||||||
*(u32*)&px[i] = i | (i << 8) | (i << 16);
|
px[i].r = i;
|
||||||
|
px[i].g = i;
|
||||||
|
px[i].b = i;
|
||||||
|
px[i].z = 0;
|
||||||
} while(++i);
|
} while(++i);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
Reference in New Issue
Block a user