diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index 7e748b1a..7e00cbc7 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,9 @@ +2012-01-19 Rene Liebscher + + * avr.c: Unsigned variable was used for return code of paged_write/load + functions. So a negative return code led never to a fallback to byte + functions. + 2012-01-17 Rene Liebscher bug #34302: Feature request : device configuration with parent classes diff --git a/avrdude/avr.c b/avrdude/avr.c index bdacf28f..a7a74769 100644 --- a/avrdude/avr.c +++ b/avrdude/avr.c @@ -289,9 +289,9 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype, break; } if (need_read) { - i = pgm->paged_load(pgm, p, mem, mem->page_size, + rc = pgm->paged_load(pgm, p, mem, mem->page_size, pageaddr, mem->page_size); - if (i < 0) + if (rc < 0) /* paged load failed, fall back to byte-at-a-time read below */ failure = 1; } else if (verbose >= 3) { @@ -807,8 +807,8 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size, break; } if (need_write) { - i = pgm->paged_write(pgm, p, m, m->page_size, pageaddr, m->page_size); - if (i < 0) + rc = pgm->paged_write(pgm, p, m, m->page_size, pageaddr, m->page_size); + if (rc < 0) /* paged write failed, fall back to byte-at-a-time write below */ failure = 1; } else if (verbose >= 3) {