From 810aa8a5edcbd60d994d7e31231a42c37d069cb2 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Thu, 19 Feb 2015 19:27:17 +0100 Subject: [PATCH] Don't take the test code so literally. --- gfx/image/image_mpng.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/gfx/image/image_mpng.c b/gfx/image/image_mpng.c index 240eab2891..0ab11a8b3b 100644 --- a/gfx/image/image_mpng.c +++ b/gfx/image/image_mpng.c @@ -59,26 +59,12 @@ bool texture_image_load(struct texture_image *out_img, const char *path) ptr = nbio_get_ptr(read, &len); - if (len != 1024*1024) - RARCH_ERR("ERROR: wrong size (2).\n"); - if (ptr) - RARCH_WARN("Read pointer is available before iterating?\n"); - nbio_begin_read(read); - while (!nbio_iterate(read)) - looped=true; - - if (!looped) - RARCH_LOG("Read finished immediately?\n"); + while (!nbio_iterate(read)) {} ptr = nbio_get_ptr(read, &len); - if (len != 1024*1024) - puts("ERROR: wrong size (3)"); - if (*(char*)ptr != 0x42 || memcmp(ptr, (char*)ptr+1, 1024*1024-1)) - puts("ERROR: wrong data"); - if (!png_decode(ptr, len, &img, FMT_ARGB8888)) goto error;