mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Avoid UB when reading Wii volume names
This commit is contained in:
@ -302,10 +302,10 @@ std::string VolumeWii::GetInternalName(const Partition& partition) const
|
||||
|
||||
std::map<Language, std::string> VolumeWii::GetLongNames() const
|
||||
{
|
||||
std::vector<u8> opening_bnr(NAMES_TOTAL_BYTES);
|
||||
opening_bnr.resize(ReadFile(*this, GetGamePartition(), "opening.bnr", opening_bnr.data(),
|
||||
opening_bnr.size(), 0x5C));
|
||||
return ReadWiiNames(opening_bnr);
|
||||
std::vector<char16_t> names(NAMES_TOTAL_CHARS);
|
||||
names.resize(ReadFile(*this, GetGamePartition(), "opening.bnr",
|
||||
reinterpret_cast<u8*>(names.data()), NAMES_TOTAL_BYTES, 0x5C));
|
||||
return ReadWiiNames(names);
|
||||
}
|
||||
|
||||
std::vector<u32> VolumeWii::GetBanner(int* width, int* height) const
|
||||
|
Reference in New Issue
Block a user