mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-13 17:34:56 +00:00
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:
4
usbasp.c
4
usbasp.c
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user