Fix strict-aliasing-related UB

This commit is contained in:
TuxSH 2019-03-15 22:23:44 +01:00
parent b05f993221
commit faeb0d9395

View File

@ -65,7 +65,10 @@ void applyColorSettings(color_setting_t* cs)
memset(px, 0, sizeof(px));
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);
do {