mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Fix memory leak when adding title sequence.
The constructor of std::string already duplicates the string.
This commit is contained in:
@@ -267,7 +267,7 @@ namespace TitleSequenceManager
|
||||
if (item.PredefinedIndex != PREDEFINED_INDEX_CUSTOM)
|
||||
{
|
||||
rct_string_id stringId = PredefinedSequences[item.PredefinedIndex].StringId;
|
||||
item.Name = String::Duplicate(language_get_string(stringId));
|
||||
item.Name = language_get_string(stringId);
|
||||
}
|
||||
item.IsZip = isZip;
|
||||
_items.push_back(item);
|
||||
|
||||
Reference in New Issue
Block a user