1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 13:03:11 +01:00

Use SDL_RWsize to get size info

This commit is contained in:
Daniël Heres
2015-10-21 09:10:43 +02:00
parent 2a99ba95e1
commit 17b906b3a0

View File

@@ -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);