From bcba16bb209b442787851d6d05ad3d67fe0af81f Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Tue, 23 Sep 2008 23:29:54 +0000 Subject: [PATCH] Do not use 32-bit masks on 64-bit offsets. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@651 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DiscIO/Src/VolumeDirectory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.cpp b/Source/Core/DiscIO/Src/VolumeDirectory.cpp index 3bf641c519..a6af0bdca7 100644 --- a/Source/Core/DiscIO/Src/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/Src/VolumeDirectory.cpp @@ -302,7 +302,7 @@ void CVolumeDirectory::BuildFST() m_FSTData = new u8[(u32)m_fstSize]; // 4 byte aligned start of data on disk - m_dataStartAddress = (FST_ADDRESS + m_fstSize + 3) & 0xfffffffc; + m_dataStartAddress = (FST_ADDRESS + m_fstSize + 3) & ~3; u64 curDataAddress = m_dataStartAddress; u32 fstOffset = 0; // offset within FST data @@ -421,7 +421,7 @@ void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u m_virtualDisk.insert(make_pair(dataOffset, entry.physicalName)); // 4 byte aligned - dataOffset = (dataOffset + entry.size + 3) & 0xfffffffc; + dataOffset = (dataOffset + entry.size + 3) & ~3; } }