mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-13 01:14:56 +00:00
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:
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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user