From 108d59b1315f48173359d3784b7b39225bd77b12 Mon Sep 17 00:00:00 2001 From: Dwayne Slater Date: Mon, 27 Mar 2017 20:52:40 -0400 Subject: [PATCH] VolumeDirectory: Correctly check name_offset alignment in assert --- Source/Core/DiscIO/VolumeDirectory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DiscIO/VolumeDirectory.cpp b/Source/Core/DiscIO/VolumeDirectory.cpp index c10a900777..56e9553a4b 100644 --- a/Source/Core/DiscIO/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/VolumeDirectory.cpp @@ -373,8 +373,8 @@ void CVolumeDirectory::BuildFST() WriteDirectory(rootEntry, &fst_offset, &name_offset, ¤t_data_address, root_offset); - // overflow check - _dbg_assert_(DVDINTERFACE, name_offset == name_table_size); + // overflow check, compare the aligned name offset with the aligned name table size + _assert_(Common::AlignUp(name_offset, 1ull << m_address_shift) == name_table_size); // write FST size and location Write32((u32)(m_fst_address >> m_address_shift), 0x0424, &m_disk_header);