From dda9d41d43e767f97b4182f62f8be7e4a087932e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 26 Feb 2015 07:26:02 +0100 Subject: [PATCH] Fix png_reverse_filter --- libretro-common/formats/png/rpng_decode_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretro-common/formats/png/rpng_decode_common.h b/libretro-common/formats/png/rpng_decode_common.h index 61f7772d5f..818d14cf10 100644 --- a/libretro-common/formats/png/rpng_decode_common.h +++ b/libretro-common/formats/png/rpng_decode_common.h @@ -108,6 +108,8 @@ static bool png_reverse_filter(uint32_t *data, const struct png_ihdr *ihdr, if (!pngp->prev_scanline || !pngp->decoded_scanline) GOTO_END_ERROR(); + pngp->h = 0; + for (; pngp->h < ihdr->height; pngp->h++, inflate_buf += pngp->pitch, data += ihdr->width) {