Correctly break when disabled and temp bps overlap.

Only affects debugging, not usual gameplay.  Fixes #6700.
This commit is contained in:
Unknown W. Brackets 2014-08-08 08:53:44 -07:00
parent c3260d5a59
commit cd413ab659

View File

@ -102,13 +102,21 @@ void MemCheck::JitCleanup()
size_t CBreakPoints::FindBreakpoint(u32 addr, bool matchTemp, bool temp)
{
size_t found = INVALID_BREAKPOINT;
for (size_t i = 0; i < breakPoints_.size(); ++i)
{
if (breakPoints_[i].addr == addr && (!matchTemp || breakPoints_[i].temporary == temp))
return i;
const auto &bp = breakPoints_[i];
if (bp.addr == addr && (!matchTemp || bp.temporary == temp))
{
if (bp.enabled)
return i;
// Hold out until the first enabled one.
if (found == INVALID_BREAKPOINT)
found = i;
}
}
return INVALID_BREAKPOINT;
return found;
}
size_t CBreakPoints::FindMemCheck(u32 start, u32 end)