mirror of https://github.com/PCSX2/pcsx2.git
iR5900: fix heap-buffer-overflow in recompileNextInstruction
This commit is contained in:
parent
2151ffcb6a
commit
c7a53703b1
|
@ -1707,7 +1707,7 @@ void recompileNextInstruction(bool delayslot, bool swapped_delay_slot)
|
||||||
g_pCurInstInfo++;
|
g_pCurInstInfo++;
|
||||||
|
|
||||||
// pc might be past s_nEndBlock if the last instruction in the block is a DI.
|
// pc might be past s_nEndBlock if the last instruction in the block is a DI.
|
||||||
if (pc <= s_nEndBlock)
|
if (pc <= s_nEndBlock && (g_pCurInstInfo + (s_nEndBlock - pc) / 4 + 1) <= s_pInstCache + s_nInstCacheSize)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
for (u32 i = 0; i < iREGCNT_GPR; ++i)
|
for (u32 i = 0; i < iREGCNT_GPR; ++i)
|
||||||
|
|
Loading…
Reference in New Issue