Bug fix from Jonathan McDowell <noodles@earth.li>

Corresponding to flashrom svn r33 and coreboot v2 svn r1988.
diff --git a/w49f002u.c b/w49f002u.c
index 5325076..02667cf 100644
--- a/w49f002u.c
+++ b/w49f002u.c
@@ -42,7 +42,7 @@
 	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,