Fix counting pages for the non-verify read case. Previously,
yielded 0, resulting in a division by 0 in report_progress(). git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1221 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
27389d23bf
commit
8a8efb3f1d
6
avr.c
6
avr.c
|
@ -383,7 +383,11 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype,
|
||||||
for (i = pageaddr;
|
for (i = pageaddr;
|
||||||
i < pageaddr + mem->page_size;
|
i < pageaddr + mem->page_size;
|
||||||
i++)
|
i++)
|
||||||
if ((mem->tags[i] & TAG_ALLOCATED) != 0) {
|
if (vmem == NULL /* no verify, read everything */ ||
|
||||||
|
(mem->tags[i] & TAG_ALLOCATED) != 0 /* verify, do only
|
||||||
|
read pages that
|
||||||
|
are needed in
|
||||||
|
input file */) {
|
||||||
npages++;
|
npages++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue