mirror of https://github.com/PCSX2/pcsx2.git
IOPBios: Fix OOB read when IRQ line is invalid.
Fixes a PS2AutoTest where RegisterIntrHandler(-1,... ) crashes PCSX2.
This commit is contained in:
parent
d0f3c620d2
commit
509e24f966
|
@ -863,7 +863,14 @@ namespace R3000A
|
|||
|
||||
void RegisterIntrHandler_DEBUG()
|
||||
{
|
||||
DevCon.WriteLn(Color_Gray, "RegisterIntrHandler: intr %s, handler %x", intrname[a0], a2);
|
||||
if(a0 < std::size(intrname) - 1)
|
||||
{
|
||||
DevCon.WriteLn(Color_Gray, "RegisterIntrHandler: intr %s, handler %x", intrname[a0], a2);
|
||||
}
|
||||
else
|
||||
{
|
||||
DevCon.WriteLn(Color_Gray, "RegisterIntrHandler: intr UNKNOWN (%d), handler %x",a0,a2);
|
||||
}
|
||||
}
|
||||
} // namespace intrman
|
||||
|
||||
|
|
Loading…
Reference in New Issue