Changeset 1204


Ignore:
Timestamp:
01/13/10 10:52:14 (12 years ago)
Author:
dingo35
Message:

Fix print protocol lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/csctapi/pps.c

    r1193 r1204  
    138138    if ((*length) <= 0 || !PPS_success) // If not by command, or PPS Exchange by command failed: Try PPS Exchange by ATR or Get parameters from ATR
    139139    {
    140         int numprot = atr->pn-1;//number of protocol lines in ATR
     140        int numprot = atr->pn;
     141        //if there is a trailing TD, this number is one too high
    141142        BYTE tx;
     143        if (ATR_GetInterfaceByte (atr, numprot-1, ATR_INTERFACE_BYTE_TD, &tx) == ATR_OK)
     144            if ((tx & 0xF0) == 0)
     145                numprot--;
    142146      cs_debug("ATR reports %i protocol lines:",numprot);
    143147        int i,point;
Note: See TracChangeset for help on using the changeset viewer.