Merge pull request #2573 from douniwan5788/tracelist

fix: `trace list` when there are exactly 8 bits of data.
This commit is contained in:
Iceman 2024-10-15 13:46:19 +02:00 committed by GitHub
commit 1bf6104e79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -648,7 +648,7 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
uint8_t nbits = parityBytes[0]; uint8_t nbits = parityBytes[0];
// only apply this to lesser than one byte // only apply this to lesser than one byte
if (data_len == 1) { if (data_len == 1 && nbits != 0) {
snprintf(line[0], 120, "%2u: %02X ", nbits, frame[0] >> (8 - nbits)); snprintf(line[0], 120, "%2u: %02X ", nbits, frame[0] >> (8 - nbits));