From f07952ecf0d5a2c6674180d0c6cc6b7fe365cf6a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 16 May 2019 17:43:16 +0200 Subject: [PATCH] Fix ASAN error --- libretro-common/formats/png/rpng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libretro-common/formats/png/rpng.c b/libretro-common/formats/png/rpng.c index 1bf075759d..3bb07f9b70 100644 --- a/libretro-common/formats/png/rpng.c +++ b/libretro-common/formats/png/rpng.c @@ -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; }