mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
VolumeDirectory: Align the name table size up properly
If the name table isn't rounded up, a Wii game can read an incorrect number of bytes when fetching the FST.
This commit is contained in:
parent
9d633307e3
commit
138b0cb14e
@ -350,7 +350,7 @@ void CVolumeDirectory::BuildFST()
|
||||
m_fst_data.clear();
|
||||
|
||||
File::FSTEntry rootEntry = File::ScanDirectoryTree(m_root_directory, true);
|
||||
u32 name_table_size = ComputeNameSize(rootEntry);
|
||||
u32 name_table_size = Common::AlignUp(ComputeNameSize(rootEntry), 1ull << m_address_shift);
|
||||
u64 total_entries = rootEntry.size + 1; // The root entry itself isn't counted in rootEntry.size
|
||||
|
||||
m_fst_name_offset = total_entries * ENTRY_SIZE; // offset of name table in FST
|
||||
|
Loading…
x
Reference in New Issue
Block a user