mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
trim string entries
This commit is contained in:
@@ -52,13 +52,18 @@ void StringTable::Read(IStream * stream, uint8 id)
|
||||
StringTableEntry entry;
|
||||
entry.Id = id;
|
||||
entry.LanguageId = languageId;
|
||||
entry.Text = stream->ReadString();
|
||||
|
||||
if (StringIsBlank(entry.Text))
|
||||
char * win1252 = stream->ReadString();
|
||||
if (StringIsBlank(win1252))
|
||||
{
|
||||
entry.LanguageId = RCT2_LANGUAGE_ID_BLANK;
|
||||
}
|
||||
|
||||
entry.Text = win1252_to_utf8_alloc(win1252);
|
||||
Memory::Free(win1252);
|
||||
|
||||
String::Trim(entry.Text);
|
||||
|
||||
_strings.push_back(entry);
|
||||
}
|
||||
Sort();
|
||||
|
||||
Reference in New Issue
Block a user