diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 277da38c9..2c6151921 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -408,7 +408,7 @@ static int flash_iterate_address_range(struct target *target, LOG_ERROR("address range 0x%8.8x .. 0x%8.8x " "is not sector-aligned", (unsigned) (c->base + addr), - (unsigned) (last_addr - 1)); + (unsigned) (c->base + last_addr - 1)); return ERROR_FLASH_DST_BREAKS_ALIGNMENT; }