Fix ASAN error

This commit is contained in:
twinaphex 2019-05-16 17:43:16 +02:00
parent 55e0a97446
commit f07952ecf0

View File

@ -853,9 +853,7 @@ static bool png_read_trns(uint8_t *buf, uint32_t *palette, unsigned entries)
unsigned i;
for (i = 0; i < entries; i++, buf++, palette++)
{
*palette = (*palette & 0x00ffffff) | *buf << 24;
}
*palette = (*palette & 0x00ffffff) | (unsigned)*buf << 24;
return true;
}