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

Fix #6460: Crash when reading corrupt object files

- Move sawyer coding functions to SawyerChunkReader.
- Replace assertions with exceptions to prevent crash on invalid chunks.
This commit is contained in:
Ted John
2017-10-21 14:29:11 +01:00
committed by Michael Steenbeek
parent 5c98c7ee5e
commit 8d1710d798
4 changed files with 141 additions and 6 deletions

View File

@@ -363,7 +363,7 @@ private:
std::sort(_items.begin(), _items.end(), [](const ObjectRepositoryItem &a,
const ObjectRepositoryItem &b) -> bool
{
return strcmp(a.Name, b.Name) < 0;
return String::Compare(a.Name, b.Name) < 0;
});
// Fix the IDs