From 356325f563b8bae7769482bd20c4ee7bdc180638 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 10 Sep 2021 18:01:42 +0200 Subject: [PATCH] ftdi_bmp: Fix bit select. --- src/platforms/hosted/ftdi_bmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/hosted/ftdi_bmp.c b/src/platforms/hosted/ftdi_bmp.c index 370f978..8244deb 100644 --- a/src/platforms/hosted/ftdi_bmp.c +++ b/src/platforms/hosted/ftdi_bmp.c @@ -583,7 +583,7 @@ void libftdi_jtagtap_tdi_tdo_seq( MPSSE_LSB | MPSSE_BITMODE | MPSSE_WRITE_NEG; data[index++] = 0; if (DI) - data[index++] = (DI[ticks]) >> rticks?0x81 : 0x01; + data[index++] = (DI[ticks] & (1 << rticks)) ? 0x81 : 0x01; } if (index) libftdi_buffer_write(data, index);