From 23b8e61bc01ca9cc6eb69efe0606cc0d1bd6f141 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Wed, 24 Jun 2020 07:19:15 +0200 Subject: [PATCH] dirtyJtag: add () to fix operator priority --- src/dirtyJtag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dirtyJtag.cpp b/src/dirtyJtag.cpp index c76ccfc..fa43ead 100644 --- a/src/dirtyJtag.cpp +++ b/src/dirtyJtag.cpp @@ -215,7 +215,7 @@ int DirtyJtag::writeTDI(uint8_t *tx, uint8_t *rx, uint32_t len, bool end) int pos = len-1; uint8_t sig; unsigned char last_bit = - (tx_buf[pos >> 3] & (1 << pos & 0x07)) ? SIG_TDI: 0; + (tx_cpy[pos >> 3] & (1 << (pos & 0x07))) ? SIG_TDI: 0; if (sendBitBang(SIG_TMS | SIG_TDI, SIG_TMS | (last_bit), &sig, true) != 0) {