Fix stupid off-by-one error in erase verification
As reported by Jody McIntyre. Thanks!
Corresponding to flashrom svn r389 and coreboot v2 svn r3894.
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
diff --git a/flashrom.c b/flashrom.c
index 26585fb..4d8614a 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -605,7 +605,7 @@
memcpy(buf, (const char *)flash->virtual_memory, size);
else
flash->read(flash, buf);
- for (erasedbytes = 0; erasedbytes <= size; erasedbytes++)
+ for (erasedbytes = 0; erasedbytes < size; erasedbytes++)
if (0xff != buf[erasedbytes]) {
printf("FAILED!\n");
fprintf(stderr, "ERROR at 0x%08x: Expected=0xff, Read=0x%02x\n",