CPUCodeCache: Fix extra page being invalidated on writing to edge

This commit is contained in:
Connor McLaughlin 2020-10-22 11:08:57 +10:00
parent bf46461dd6
commit 3fc9f264d7
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ ALWAYS_INLINE void InvalidateCodePages(PhysicalMemoryAddress address, u32 word_c
{
const u32 start_page = address / CPU_CODE_CACHE_PAGE_SIZE;
const u32 end_page = (address + word_count * sizeof(u32)) / CPU_CODE_CACHE_PAGE_SIZE;
for (u32 page = start_page; page <= end_page; page++)
for (u32 page = start_page; page < end_page; page++)
{
if (Bus::m_ram_code_bits[page])
CPU::CodeCache::InvalidateBlocksWithPageIndex(page);