CPU/Recompiler: Fix OOB in register pairing

This commit is contained in:
Connor McLaughlin 2020-10-18 23:05:58 +10:00
parent 6a4a4c62d7
commit 0fca011bd4
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ void RegisterCache::ReserveCalleeSavedRegisters()
// can we find a paired register? (mainly for ARM)
u32 reg_pair;
for (reg_pair = reg + 1; reg < HostReg_Count; reg_pair++)
for (reg_pair = reg + 1; reg_pair < HostReg_Count; reg_pair++)
{
if ((m_state.host_reg_state[reg_pair] & (HostRegState::CalleeSaved | HostRegState::CalleeSavedAllocated)) ==
HostRegState::CalleeSaved)