Multiple watchpoints were broken

This commit is contained in:
Lior Halphon 2016-07-09 14:37:11 +03:00
parent de4983099a
commit b4208be4f4
1 changed files with 1 additions and 1 deletions

View File

@ -965,7 +965,7 @@ void GB_debugger_ret_hook(GB_gameboy_t *gb)
void GB_debugger_test_write_watchpoint(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
{
uint16_t index = find_breakpoint(gb, addr);
uint16_t index = find_watchpoint(gb, addr);
if (index < gb->n_watchpoints && gb->watchpoints[index].addr == addr) {
if (!(gb->watchpoints[index].flags & GB_WATCHPOINT_W)) {
return;