Fix eraseblock walking and add a few more checks to make sure such bugs get caught in the future

I found this bug during a code review. A consistency check for
eraseblock definitions has been merged as well.

Corresponding to flashrom svn r800.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
1 file changed