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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user