From 85e827043dca9fca0b6d55e04c8bc7c90eddc3d2 Mon Sep 17 00:00:00 2001 From: Colin O Flynn Date: Thu, 24 Nov 2005 15:00:49 +0000 Subject: [PATCH] *Added Brian Dean's patch to ser_win32.c, fixing bug 14681 "-vvvv causes communication to fail" git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@546 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/ser_win32.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/avrdude/ser_win32.c b/avrdude/ser_win32.c index 3b21a2aa..8ccecc62 100644 --- a/avrdude/ser_win32.c +++ b/avrdude/ser_win32.c @@ -179,6 +179,7 @@ static int ser_send(int fd, char * buf, size_t buflen) size_t len = buflen; unsigned char c='\0'; DWORD written; + char * b = buf; HANDLE hComPort=(HANDLE)fd; @@ -195,8 +196,8 @@ static int ser_send(int fd, char * buf, size_t buflen) { fprintf(stderr, "%s: Send: ", progname); - while (buflen) { - c = *buf; + while (len) { + c = *b; if (isprint(c)) { fprintf(stderr, "%c ", c); } @@ -204,8 +205,8 @@ static int ser_send(int fd, char * buf, size_t buflen) fprintf(stderr, ". "); } fprintf(stderr, "[%02x] ", c); - buf++; - buflen--; + b++; + len--; } fprintf(stderr, "\n"); }