From 17b906b3a0c07e71c3c3fbf010e8f7215ec4233c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Heres?= Date: Wed, 21 Oct 2015 09:10:43 +0200 Subject: [PATCH] Use SDL_RWsize to get size info --- src/util/util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 2189de7e91..467172aed7 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -125,9 +125,7 @@ bool readentirefile(const utf8 *path, void **outBuffer, int *outLength) return 0; // Get length - SDL_RWseek(fp, 0, RW_SEEK_END); - fpLength = (int)SDL_RWtell(fp); - SDL_RWseek(fp, 0, RW_SEEK_SET); + fpLength = (int)SDL_RWsize(fp); // Read whole file into a buffer fpBuffer = malloc(fpLength);