From 9cc830ecd6b4ec220a2c0cf827f2fe50223f8ade Mon Sep 17 00:00:00 2001 From: Andre Leiradella Date: Sun, 29 May 2016 11:30:04 -0300 Subject: [PATCH] fixed getting wrong alpha values from tRNS chunk --- libretro-common/formats/png/rpng.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretro-common/formats/png/rpng.c b/libretro-common/formats/png/rpng.c index 02c4f888e8..31fa0c8b00 100644 --- a/libretro-common/formats/png/rpng.c +++ b/libretro-common/formats/png/rpng.c @@ -1028,6 +1028,8 @@ bool rpng_iterate_image(rpng_t *rpng) if (chunk.size > 256) goto error; + buf += 8; + if (!png_read_trns(buf, rpng->palette, chunk.size)) goto error; }