1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Merge pull request #2097 from Dandandan/optimizereadentirefile

Optimize readentirefile
This commit is contained in:
Ted John
2015-10-21 12:52:27 +01:00

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