1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00

Fix bounds checks and a nullptr check

This commit is contained in:
Johan Mattsson
2022-02-03 21:42:12 +01:00
committed by GitHub
parent 66c9c99ed2
commit c00cc90b1f
5 changed files with 7 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ std::unique_ptr<TitleSequence> LoadTitleSequence(const std::string& path)
std::unique_ptr<TitleSequenceParkHandle> TitleSequenceGetParkHandle(const TitleSequence& seq, size_t index)
{
std::unique_ptr<TitleSequenceParkHandle> handle;
if (index <= seq.Saves.size())
if (index < seq.Saves.size())
{
const auto& filename = seq.Saves[index];
if (seq.IsZip)