mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix crash if save does not exist
This commit is contained in:
parent
129d85fa57
commit
477677775f
|
@ -498,15 +498,15 @@ static std::string LegacyScriptWrite(const TitleSequence& seq)
|
|||
switch (command.Type)
|
||||
{
|
||||
case TitleScript::Load:
|
||||
if (command.SaveIndex == 0xFF)
|
||||
{
|
||||
sb.Append("LOAD <No save file>");
|
||||
}
|
||||
else
|
||||
if (command.SaveIndex < seq.Saves.size())
|
||||
{
|
||||
sb.Append("LOAD ");
|
||||
sb.Append(seq.Saves[command.SaveIndex].c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append("LOAD <No save file>");
|
||||
}
|
||||
break;
|
||||
case TitleScript::LoadSc:
|
||||
if (command.Scenario[0] == '\0')
|
||||
|
|
Loading…
Reference in New Issue