]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/mifareutil.c
added automatically saving the hitag2 memory content to file
[proxmark3-svn] / armsrc / mifareutil.c
index a88f21bca154916e31989bfdece0a8527c5665c8..085531f46ed5e97a2c8a7fbd22b5adf74a00bcb1 100644 (file)
@@ -1,5 +1,5 @@
 //-----------------------------------------------------------------------------\r
-// Merlok, May 2011\r
+// Merlok, May 2011, 2012\r
 // Many authors, whom made it possible\r
 //\r
 // This code is licensed to you under the terms of the GNU GPL, version 2 or,\r
@@ -311,7 +311,7 @@ int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid)
        // Mifare HALT\r
        uint8_t* receivedAnswer = mifare_get_bigbufptr();\r
 \r
-       len = mifare_sendcmd_short(pcs, 1, 0x50, 0x00, receivedAnswer);\r
+       len = mifare_sendcmd_short(pcs, pcs == NULL ? 0:1, 0x50, 0x00, receivedAnswer);\r
        if (len != 0) {\r
                if (MF_DBGLEVEL >= 1)   Dbprintf("halt error. response len: %x", len);  \r
                return 1;\r
Impressum, Datenschutz