Fix crash if save does not exist

This commit is contained in:
Ted John 2021-01-29 21:10:31 +00:00
parent 129d85fa57
commit 477677775f
1 changed files with 5 additions and 5 deletions

View File

@ -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')