flashrom: Fix stupid off-by-one error in erase verification.

As reported by Jody McIntyre. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3894 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Peter Stuge 2009-01-25 20:41:51 +00:00
parent 269e1bdd13
commit 7e6ff8bfc0
1 changed files with 1 additions and 1 deletions

View File

@ -605,7 +605,7 @@ int main(int argc, char *argv[])
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",