mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fall-back to default language in case none is set
From thread https://openrct2.org/forums/topic/720-openrct2-doesnt-work/, the object http://www.nedesigns.com/rct2-object/5130/scgletrs/ does not set `pString` properly, so use a default fallback in such case.
This commit is contained in:
@@ -346,6 +346,11 @@ rct_string_id object_get_localised_text(uint8_t** pStringTable/*ebp*/, int type/
|
||||
// Skip over the actual string entry to get to the next entry
|
||||
while (*(*pStringTable)++ != 0);
|
||||
}
|
||||
// Fall back in case language does not get set.
|
||||
if (pString == NULL)
|
||||
{
|
||||
pString = (char*)(*pStringTable);
|
||||
}
|
||||
|
||||
char name[9];
|
||||
if (RCT2_GLOBAL(0x009ADAFC, uint8) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user