Skip to content
Snippets Groups Projects
Commit 14da36cb authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix GCC UBSan (SANITIZE=1 build) runtime error

left shift of 255 by 24 places cannot be represented in type 'int'
parent b4f9d84b
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4512 passed
......@@ -1931,7 +1931,7 @@ int bitmap_drv_init(void (*drawrect_cb) (struct rectlist *data)
vstat.flags = VIDMODES_FLAG_PALETTE_VMEM;
pthread_mutex_lock(&screenlock);
for (i = 0; i < sizeof(dac_default)/sizeof(struct dac_colors); i++) {
palette[i] = (0xff << 24) | (dac_default[i].red << 16) | (dac_default[i].green << 8) | dac_default[i].blue;
palette[i] = (0xffU << 24) | (dac_default[i].red << 16) | (dac_default[i].green << 8) | dac_default[i].blue;
}
pthread_mutex_unlock(&screenlock);
pthread_mutex_unlock(&vstatlock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment