aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2018-07-28 17:13:41 +0200
committerKévin Redon <kredon@sysmocom.de>2018-07-28 20:59:44 +0200
commitec396bf4029ea66ce353e1018cd55ac2231220dc (patch)
treeff918868288a3f452b71b0d0819a83a281546eb1
parent697199676e81692dcb8073e81e906dbf3addbb01 (diff)
sniff: fix ATR checksum calculation
this issue also cause the sent ATR to be empty Change-Id: I6edff7aeb3185c835656acde75886fb6c90c0582
-rw-r--r--firmware/libcommon/source/sniffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c
index 5cf96fd..c57877f 100644
--- a/firmware/libcommon/source/sniffer.c
+++ b/firmware/libcommon/source/sniffer.c
@@ -505,7 +505,7 @@ static void process_byte_atr(uint8_t byte)
if (ATR_S_WAIT_TCK == atr_state) {
uint8_t ui;
uint8_t checksum = 0;
- for (ui = 1; ui < atr_i; atr_i++) {
+ for (ui = 1; ui < atr_i; ui++) {
checksum ^= atr[ui];
}
if (checksum) {