mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Check file system validity before reading opening.bnr
This happened to work without any problems because the only way for a file system to be invalid was to not have the right GC/Wii magic word in the unencrypted area, and a volume could not be created without having the right GC/Wii magic word there. Now that file systems read the magic word from a partition instead, a fix is needed.
This commit is contained in:
@ -299,6 +299,9 @@ std::string CVolumeWiiCrypted::GetInternalName(const Partition& partition) const
|
||||
std::map<Language, std::string> CVolumeWiiCrypted::GetLongNames() const
|
||||
{
|
||||
std::unique_ptr<IFileSystem> file_system(CreateFileSystem(this, GetGamePartition()));
|
||||
if (!file_system)
|
||||
return {{}};
|
||||
|
||||
std::vector<u8> opening_bnr(NAMES_TOTAL_BYTES);
|
||||
size_t size = file_system->ReadFile("opening.bnr", opening_bnr.data(), opening_bnr.size(), 0x5C);
|
||||
opening_bnr.resize(size);
|
||||
|
Reference in New Issue
Block a user