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

suppress invalid header in legacy scores for initial file

This commit is contained in:
Ted John
2016-06-23 22:20:26 +01:00
parent 46bf0a47d9
commit 080f470ef1

View File

@@ -340,6 +340,12 @@ static bool scenario_scores_legacy_load(const utf8 *path)
return false;
}
Sint64 fileSize = SDL_RWsize(file);
if (fileSize <= 4) {
// Initial value of scores for RCT2, just ignore
return false;
}
// Load header
rct_scenario_scores_header header;
if (SDL_RWread(file, &header, 16, 1) != 1) {