]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf14a.c
Fixed indentation
[proxmark3-svn] / client / cmdhf14a.c
index e8dc8abca6723b08acf48af32d1d5838889e1b23..c997607652c9c8b632a6dffcf239efd5c23d31e1 100644 (file)
@@ -78,6 +78,10 @@ int CmdHF14AList(const char *Cmd)
                if(tracepos == 0) {
                        first_timestamp = timestamp;
                }
                if(tracepos == 0) {
                        first_timestamp = timestamp;
                }
+
+               // Break and stick with current result if buffer was not completely full
+               if (timestamp == 0x44444444) break; 
+
                tracepos += 4;
                duration = *((uint16_t *)(trace + tracepos));
                tracepos += 2;
                tracepos += 4;
                duration = *((uint16_t *)(trace + tracepos));
                tracepos += 2;
@@ -102,9 +106,6 @@ int CmdHF14AList(const char *Cmd)
                uint8_t *parityBytes = trace + tracepos;
                tracepos += parity_len;
 
                uint8_t *parityBytes = trace + tracepos;
                tracepos += parity_len;
 
-               // Break and stick with current result if buffer was not completely full
-               if (timestamp == 0x44444444) break; 
-
                char line[16][110];
                for (int j = 0; j < data_len; j++) {
                        int oddparity = 0x01;
                char line[16][110];
                for (int j = 0; j < data_len; j++) {
                        int oddparity = 0x01;
@@ -190,6 +191,11 @@ int CmdHF14AReader(const char *Cmd)
        
        if(select_status == 0) {
                PrintAndLog("iso14443a card select failed");
        
        if(select_status == 0) {
                PrintAndLog("iso14443a card select failed");
+               // disconnect
+               c.arg[0] = 0;
+               c.arg[1] = 0;
+               c.arg[2] = 0;
+               SendCommand(&c);
                return 0;
        }
 
                return 0;
        }
 
Impressum, Datenschutz