diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index 96101a4e..88500cdf 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,10 @@ +2007-10-29 Joerg Wunsch + + bug #21076: -vvvv serial receive prints are empty in Win32 build + * ser_win32.c (ser_recv): Drop the essentially unused variable + "len", and use the variable "read" in order to track how many + bytes have just been read in. + 2007-10-29 Joerg Wunsch bug #21145: atmega329p not recognized diff --git a/avrdude/ser_win32.c b/avrdude/ser_win32.c index 44a6d3fd..fdb49735 100644 --- a/avrdude/ser_win32.c +++ b/avrdude/ser_win32.c @@ -245,7 +245,6 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen { unsigned char c; unsigned char * p = buf; - size_t len = 0; DWORD read; HANDLE hComPort=(HANDLE)fd->pfd; @@ -282,7 +281,7 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen { fprintf(stderr, "%s: Recv: ", progname); - while (len) { + while (read) { c = *p; if (isprint(c)) { fprintf(stderr, "%c ", c); @@ -293,7 +292,7 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen fprintf(stderr, "[%02x] ", c); p++; - len--; + read--; } fprintf(stderr, "\n"); }