From 58af5529458b9e846bc0122ccb62e2e9c8db6deb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Feb 2015 16:35:49 +0100 Subject: [PATCH] rpng_load_image_argb - simplify --- 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 2f88531d8b..1afd747742 100644 --- a/libretro-common/formats/png/rpng.c +++ b/libretro-common/formats/png/rpng.c @@ -818,11 +818,9 @@ bool rpng_load_image_argb(const char *path, uint32_t **data, data, width, height, &file_len)) GOTO_END_ERROR(); - pos = ftell(file); - /* feof() apparently isn't triggered after a seek (IEND). */ - for (; pos < file_len && pos >= 0; pos = ftell(file)) + for (pos = 0; pos < file_len && pos >= 0; pos = ftell(file)) { size_t increment = 0;