CDImagePPF: Ignore out-of-range sectors

This commit is contained in:
Stenzek 2025-07-23 22:00:13 +10:00
parent 830b812fc7
commit 0522b6ffb5
No known key found for this signature in database

View File

@ -378,8 +378,8 @@ bool CDImagePPF::AddPatch(u64 offset, const u8* patch, u32 patch_size)
const u32 sector_offset = Truncate32(offset % RAW_SECTOR_SIZE);
if (sector_index >= m_parent_image->GetLBACount())
{
ERROR_LOG("Sector {} in patch is out of range", sector_index);
return false;
WARNING_LOG("Ignoring out-of-range sector {} (max {})", sector_index, m_parent_image->GetLBACount());
return true;
}
const u32 bytes_to_patch = std::min(patch_size, RAW_SECTOR_SIZE - sector_offset);