From f639ccc9a63adcd3add4cc4963fd13425e058284 Mon Sep 17 00:00:00 2001 From: Rene Liebscher Date: Sat, 4 Feb 2012 16:43:37 +0000 Subject: [PATCH] patch #7717 avrftdi_flash_write is broken * avrftdi.c: fixed wrong buffer address initialization in paged_write bug #35296 Extraneous newlines in output. * main.c: fixed output of newlines at 100% progress git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1065 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/ChangeLog | 7 +++++++ avrdude/avrftdi.c | 2 +- avrdude/main.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index e85e1634..6f56a3c4 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,10 @@ +2012-02-04 Rene Liebscher + + patch #7717 avrftdi_flash_write is broken + * avrftdi.c: fixed wrong buffer address initialization in paged_write + bug #35296 Extraneous newlines in output. + * main.c: fixed output of newlines at 100% progress + 2012-02-03 Rene Liebscher patch #7715 FT4232H support diff --git a/avrdude/avrftdi.c b/avrdude/avrftdi.c index a6367c6a..098cb240 100644 --- a/avrdude/avrftdi.c +++ b/avrdude/avrftdi.c @@ -787,7 +787,7 @@ static int avrftdi_flash_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m, unsigned int blocksize; int use_lext_address = m->op[AVR_OP_LOAD_EXT_ADDR] != NULL; unsigned char buf[4*len+4], *bufptr = buf; - unsigned char *buffer = m->buf; + unsigned char *buffer = &m->buf[addr]; unsigned char byte; /* pre-check opcodes */ diff --git a/avrdude/main.c b/avrdude/main.c index 9bd05195..78566edc 100644 --- a/avrdude/main.c +++ b/avrdude/main.c @@ -158,8 +158,8 @@ static void update_progress_tty (int percent, double etime, char *hdr) } if (percent == 100) { + if (!last) fprintf (stderr, "\n\n"); last = 1; - fprintf (stderr, "\n\n"); } setvbuf(stderr, (char*)NULL, _IOLBF, 0);