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:
@@ -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];
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace TitleSequenceManager
|
||||
SortSequences();
|
||||
index = FindItemIndexByPath(path);
|
||||
}
|
||||
return success;
|
||||
return index;
|
||||
}
|
||||
|
||||
static const uint16 GetPredefinedIndex(const std::string &path)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user