diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 7ad220f9..67cafb87 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,9 @@ +2008-07-09 Arnim Laeuger + + * src/tap/usbconn/libftd2xx.c (usbconn_ftd2xx_write), + src/tap/usbconn/libftdi.c (usbconn_ftdi_write): don't subtract from + p->to_recv + 2008-07-03 Mike Frysinger * src/lib/ansidecl.h, src/lib/libiberty.h: Import headers from binutils diff --git a/jtag/src/tap/usbconn/libftd2xx.c b/jtag/src/tap/usbconn/libftd2xx.c index 27d21e61..a5edacde 100644 --- a/jtag/src/tap/usbconn/libftd2xx.c +++ b/jtag/src/tap/usbconn/libftd2xx.c @@ -204,7 +204,8 @@ usbconn_ftd2xx_write( usbconn_t *conn, uint8_t *buf, int len, int recv ) { memcpy( &(p->send_buf[p->send_buffered]), buf, len ); p->send_buffered += len; - p->to_recv += recv; + if (recv > 0) + p->to_recv += recv; if (recv < 0) { diff --git a/jtag/src/tap/usbconn/libftdi.c b/jtag/src/tap/usbconn/libftdi.c index 82fe56ac..cc12a15a 100644 --- a/jtag/src/tap/usbconn/libftdi.c +++ b/jtag/src/tap/usbconn/libftdi.c @@ -203,7 +203,8 @@ usbconn_ftdi_write( usbconn_t *conn, uint8_t *buf, int len, int recv ) { memcpy( &(p->send_buf[p->send_buffered]), buf, len ); p->send_buffered += len; - p->to_recv += recv; + if (recv > 0) + p->to_recv += recv; if (recv < 0) {