Skip to content
Snippets Groups Projects
Commit 6abf942b authored by oharboe's avatar oharboe
Browse files

Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> fix end of address...

Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> fix end of address space flash sector comparision

git-svn-id: svn://svn.berlios.de/openocd/trunk@961 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent a7144a75
No related branches found
No related tags found
No related merge requests found
...@@ -905,7 +905,7 @@ flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr) ...@@ -905,7 +905,7 @@ flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr)
return NULL; return NULL;
} }
/* check whether address belongs to this flash bank */ /* check whether address belongs to this flash bank */
if ((addr >= c->base) && (addr < c->base + c->size) && target == c->target) if ((addr >= c->base) && (addr <= c->base + (c->size - 1)) && target == c->target)
return c; return c;
} }
LOG_ERROR("No flash at address 0x%08x\n", addr); LOG_ERROR("No flash at address 0x%08x\n", addr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment