Reported by Jason Kotzin:

* usbasp.c (usbasp_spi_paged_load, usbasp_spi_paged_write):
Fix buffer address calculation.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1034 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2012-01-03 22:38:59 +00:00
parent 965f879ab6
commit 0b3feb71b8
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2012-01-03 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Reported by Jason Kotzin:
* usbasp.c (usbasp_spi_paged_load, usbasp_spi_paged_write):
Fix buffer address calculation.
2012-01-03 Rene Liebscher <R.Liebscher@gmx.de>
patch #7629 add support for atmega48p

View File

@ -612,7 +612,7 @@ static int usbasp_spi_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
unsigned char cmd[4];
int wbytes = n_bytes;
int blocksize;
unsigned char * buffer = m->buf;
unsigned char *buffer = m->buf + address;
int function;
if (strcmp(m->desc, "flash") == 0) {
@ -676,7 +676,7 @@ static int usbasp_spi_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
unsigned char cmd[4];
int wbytes = n_bytes;
int blocksize;
unsigned char * buffer = m->buf;
unsigned char *buffer = m->buf + address;
unsigned char blockflags = USBASP_BLOCKFLAG_FIRST;
int function;