mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix #1857
This commit is contained in:
parent
826d96ab90
commit
0c0847160d
|
@ -322,12 +322,14 @@ static uint8* track_list_cache_load(int totalFiles)
|
|||
SDL_RWread(file, &fileCount, 4, 1);
|
||||
|
||||
if (fileCount != totalFiles){
|
||||
SDL_RWclose(file);
|
||||
log_verbose("Track file count is different.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
track_list_cache = malloc(track_list_size);
|
||||
SDL_RWread(file, track_list_cache, track_list_size, 1);
|
||||
SDL_RWclose(file);
|
||||
return track_list_cache;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue