summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index 5eb51cd2..01088f3c 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -316,6 +316,7 @@ static int flash_iterate_address_range(struct target *target,
/** @todo: handle erasures that cross into adjacent banks */
addr -= c->base;
+ last_addr -= c->base;
for (i = 0; i < c->num_sectors; i++)
{