diff options
-rw-r--r-- | src/flash/flash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c index e5adcc86..b9c9f5cf 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -905,7 +905,7 @@ flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr) return NULL; } /* 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; } LOG_ERROR("No flash at address 0x%08x\n", addr); |