Commits

spencercw committed b87f139

#9 Fix hitting of breakpoints in large ROMs

Comments (0)

Files changed (1)

gb_emulator/src/gb_debugger.cpp

 	}
 	else
 	{
+		uint32_t codeAddr = getCodeAddr(gb_.cpu_.pc);
 		for (set<shared_ptr<GbBreakpoint> >::const_iterator breakpoint = breakpoints_.begin(),
 			end = breakpoints_.end(); breakpoint != end; ++breakpoint)
 		{
-			if ((*breakpoint)->address == gb_.cpu_.pc)
+			if ((*breakpoint)->address == codeAddr)
 			{
 				for (set<Listener *>::const_iterator listener = listeners_.begin(),
 					end = listeners_.end(); listener != end; ++listener)