Skip to content

Commit 94d7302

Browse files
authored
Merge pull request #53
fix ATR TCK presence check
2 parents 533505a + 022dc8f commit 94d7302

File tree

1 file changed

+3
-3
lines changed
  • src/nfc-lib/lib-lab/lab-logic/src/main/cpp/tech

1 file changed

+3
-3
lines changed

src/nfc-lib/lib-lab/lab-logic/src/main/cpp/tech/Iso7816.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ struct Iso7816::Impl : IsoTech
10831083
if (frame[i] & ATR_TD_MASK)
10841084
{
10851085
// check presence of TCK (then T!=0 on some of TDk bytes)
1086-
c |= frame[i] & 0x0f;
1086+
c |= frame[n] & 0x0f;
10871087

10881088
// next structural byte
10891089
i = n++;
@@ -1380,11 +1380,11 @@ struct Iso7816::Impl : IsoTech
13801380
if (atr[i] & ATR_TB_MASK) n++; // skip TBi
13811381
if (atr[i] & ATR_TC_MASK) n++; // skip TCi
13821382

1383-
// check presence of TDk, and protocol indicator != 0 to trigger TCK check
1383+
// check presence of TDk, using protocol indicator != 0 to trigger TCK check
13841384
if (atr[i] & ATR_TD_MASK)
13851385
{
13861386
// get protocol indicator
1387-
c |= atr[i] & 0x0f;
1387+
c |= atr[n] & 0x0f;
13881388

13891389
// next structural byte
13901390
i = n++;

0 commit comments

Comments
 (0)