summaryrefslogtreecommitdiff
path: root/util/flash_and_burn/w49f002u.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/flash_and_burn/w49f002u.c')
-rw-r--r--util/flash_and_burn/w49f002u.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/flash_and_burn/w49f002u.c b/util/flash_and_burn/w49f002u.c
index 5325076f4f..02667cf1a0 100644
--- a/util/flash_and_burn/w49f002u.c
+++ b/util/flash_and_burn/w49f002u.c
@@ -42,7 +42,7 @@ int write_49f002(struct flashchip *flash, unsigned char *buf)
erase_chip_jedec(flash);
printf("Programming Page: ");
- for (i = 0; i < total_size; i++) {
+ for (i = 0; i < total_size / page_size; i++) {
/* write to the sector */
printf("%04d at address: 0x%08x ", i, i * page_size);
write_sector_jedec(bios, buf + i * page_size,