1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Fix creation of new title sequence

This commit is contained in:
Ted John
2016-11-29 17:54:57 +00:00
parent 975cb43137
commit 877080f00c
3 changed files with 5 additions and 2 deletions

View File

@@ -399,6 +399,9 @@ static utf8 * LegacyScriptWrite(TitleSequence * seq)
utf8 buffer[128];
auto sb = StringBuilder(128);
sb.Append("# SCRIPT FOR ");
sb.Append(seq->Name);
sb.Append("\n");
for (size_t i = 0; i < seq->NumCommands; i++)
{
const TitleCommand * command = &seq->Commands[i];

View File

@@ -164,7 +164,7 @@ namespace TitleSequenceManager
SortSequences();
index = FindItemIndexByPath(path);
}
return success;
return index;
}
static const uint16 GetPredefinedIndex(const std::string &path)

View File

@@ -87,7 +87,7 @@ public:
FixViewLocation();
// Check that position is valid
if (_position > (sint32)_sequence->NumCommands)
if (_position >= (sint32)_sequence->NumCommands)
{
_position = 0;
return false;