From 2e61afcab8a8f40515048d56297a11fcc7d66e42 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Feb 2015 21:35:06 +0100 Subject: [PATCH] use rpng_nbio.c now - try to cover PNG_CHUNK_PLTE as well --- Makefile.common | 2 +- libretro-common/formats/png/rpng_nbio.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.common b/Makefile.common index ca606b8edf..b70dd2187e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -570,7 +570,7 @@ endif ifeq ($(HAVE_ZLIB), 1) ZLIB_OBJS = decompress/zip_support.o - OBJ += libretro-common/formats/png/rpng.o file_extract.o + OBJ += libretro-common/formats/png/rpng_nbio.o file_extract.o OBJ += $(ZLIB_OBJS) DEFINES += -DHAVE_ZLIB HAVE_COMPRESSION = 1 diff --git a/libretro-common/formats/png/rpng_nbio.c b/libretro-common/formats/png/rpng_nbio.c index f028908b7e..459cff5a9a 100644 --- a/libretro-common/formats/png/rpng_nbio.c +++ b/libretro-common/formats/png/rpng_nbio.c @@ -660,6 +660,8 @@ bool rpng_load_image_argb_iterate(uint8_t *buf, if (entries > 256) return false; + buf += 8; + for (i = 0; i < entries; i++) palette[i] = buf[i];