Debugger: fix 'Search memory' which had an out-by-one range bug for the end-address (#1127)
This commit is contained in:
parent
3f40955306
commit
b299a5d701
|
@ -5415,12 +5415,12 @@ int _SearchMemoryFind(
|
||||||
g_vMemorySearchResults.clear();
|
g_vMemorySearchResults.clear();
|
||||||
g_vMemorySearchResults.push_back( NO_6502_TARGET );
|
g_vMemorySearchResults.push_back( NO_6502_TARGET );
|
||||||
|
|
||||||
WORD nAddress;
|
uint32_t nAddress; // NB. can't be uint16_t, since may need to count to 0x10000 if searching up to and including 0xFFFF
|
||||||
for ( nAddress = nAddressStart; nAddress < nAddressEnd; nAddress++ )
|
for ( nAddress = nAddressStart; nAddress <= nAddressEnd; nAddress++ )
|
||||||
{
|
{
|
||||||
bool bMatchAll = true;
|
bool bMatchAll = true;
|
||||||
|
|
||||||
WORD nAddress2 = nAddress;
|
uint32_t nAddress2 = nAddress;
|
||||||
|
|
||||||
int nMemBlocks = vMemorySearchValues.size();
|
int nMemBlocks = vMemorySearchValues.size();
|
||||||
for ( int iBlock = 0; iBlock < nMemBlocks; iBlock++, nAddress2++ )
|
for ( int iBlock = 0; iBlock < nMemBlocks; iBlock++, nAddress2++ )
|
||||||
|
@ -5463,8 +5463,7 @@ int _SearchMemoryFind(
|
||||||
if ((iBlock + 1) == nMemBlocks) // there is no next block, hence we match
|
if ((iBlock + 1) == nMemBlocks) // there is no next block, hence we match
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
WORD nAddress3 = nAddress2;
|
for (uint32_t nAddress3 = nAddress2; nAddress3 < nAddressEnd; nAddress3++ )
|
||||||
for (nAddress3 = nAddress2; nAddress3 < nAddressEnd; nAddress3++ )
|
|
||||||
{
|
{
|
||||||
if ((ms.m_iType == MEM_SEARCH_BYTE_EXACT ) ||
|
if ((ms.m_iType == MEM_SEARCH_BYTE_EXACT ) ||
|
||||||
(ms.m_iType == MEM_SEARCH_NIB_HIGH_EXACT) ||
|
(ms.m_iType == MEM_SEARCH_NIB_HIGH_EXACT) ||
|
||||||
|
|
Loading…
Reference in New Issue