usbBlaster: fix build

This commit is contained in:
Gwenhael Goavec-Merou 2020-08-19 17:21:20 +02:00
parent 4a70675ea6
commit fc503e5b27
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ int UsbBlaster::writeBit(uint8_t *tdo, int nb_bit)
* the buffer may contains some tms bit, so start with i
* equal to fill exactly nb_bit bits
* */
for (int i = nb_bit, offset=0; i < rd_bit; i++, offset++) {
for (int i = 0, offset=0; i < nb_bit; i++, offset++) {
tdo[offset >> 3] = (((_in_buf[i] & (1<<0)) ? 0x80 : 0x00) |
(tdo[offset >> 3] >> 1));
}