]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
fixed sending of RATS during iso-14443-4 select
authorroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 27 Mar 2013 12:23:59 +0000 (12:23 +0000)
committerroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 27 Mar 2013 12:23:59 +0000 (12:23 +0000)
armsrc/iso14443a.c

index 8e07814023e057799c65662ab699059927976d37..3065c92a9ab2a89a92aec9808df2e24f494994d9 100644 (file)
@@ -1728,12 +1728,12 @@ int iso14443a_select_card(byte_t* uid_ptr, iso14a_card_select_t* p_hi14a_card, u
   }
 
        // Request for answer to select
-       if(p_hi14a_card) {  // JCOP cards - if reader sent RATS then there is no MIFARE session at all!!!
-               AppendCrc14443a(rats, 2);
-               ReaderTransmit(rats, sizeof(rats));
-               
-               if (!(len = ReaderReceive(resp))) return 0;
-               
+  AppendCrc14443a(rats, 2);
+  ReaderTransmit(rats, sizeof(rats));
+  
+  if (!(len = ReaderReceive(resp))) return 0;
+
+  if(p_hi14a_card) {
                memcpy(p_hi14a_card->ats, resp, sizeof(p_hi14a_card->ats));
                p_hi14a_card->ats_len = len;
        }
Impressum, Datenschutz