Skip to content

Commit

Permalink
Merge pull request #53
Browse files Browse the repository at this point in the history
fix ATR TCK presence check
  • Loading branch information
josevcm authored Dec 13, 2024
2 parents 533505a + 022dc8f commit 94d7302
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nfc-lib/lib-lab/lab-logic/src/main/cpp/tech/Iso7816.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ struct Iso7816::Impl : IsoTech
if (frame[i] & ATR_TD_MASK)
{
// check presence of TCK (then T!=0 on some of TDk bytes)
c |= frame[i] & 0x0f;
c |= frame[n] & 0x0f;

// next structural byte
i = n++;
Expand Down Expand Up @@ -1380,11 +1380,11 @@ struct Iso7816::Impl : IsoTech
if (atr[i] & ATR_TB_MASK) n++; // skip TBi
if (atr[i] & ATR_TC_MASK) n++; // skip TCi

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

// next structural byte
i = n++;
Expand Down

0 comments on commit 94d7302

Please sign in to comment.