From 6abf942baba746df2c7195abe01a9b05cec13b1e Mon Sep 17 00:00:00 2001 From: oharboe Date: Sun, 24 Aug 2008 18:09:37 +0000 Subject: [PATCH] Daniel Gimpelevich fix end of address space flash sector comparision git-svn-id: svn://svn.berlios.de/openocd/trunk@961 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5