mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 12:03:07 +01:00
convert_multibyte_charset unconditionally assumes that a 0xFF is always followed by two more bytes. This is not the case with BATFL.DAT, whose string at offset 0x2D6 (languageId = 0xA) ends with bytes 0xFF, 0xC2, 0x00. Therefore, it seems like 0x00 is used as both the string terminator and the second byte of a multicharacter sequence in this case. This commit does not change the original behaviour at all, and prevents the code from looking for a 0x00 after the string actually ends.