summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-08-24 18:09:37 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-08-24 18:09:37 +0000
commit6abf942baba746df2c7195abe01a9b05cec13b1e (patch)
treed8c7a8d185b50f6606d9947afe209c8fcd9a001d /src
parenta7144a759ce3b37742306cae77dbbfcd82f064ac (diff)
downloadopenocd_libswd-6abf942baba746df2c7195abe01a9b05cec13b1e.tar.gz
openocd_libswd-6abf942baba746df2c7195abe01a9b05cec13b1e.tar.bz2
openocd_libswd-6abf942baba746df2c7195abe01a9b05cec13b1e.tar.xz
openocd_libswd-6abf942baba746df2c7195abe01a9b05cec13b1e.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/flash/flash.c2
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);