X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/aea4d76687f3aa3d5dcd0fc5cf3d36f8f753994c..ca363c2348145c3c7e67d27aa9a64ff065459d55:/armsrc/mifareutil.c?ds=sidebyside diff --git a/armsrc/mifareutil.c b/armsrc/mifareutil.c index a88f21bc..085531f4 100644 --- a/armsrc/mifareutil.c +++ b/armsrc/mifareutil.c @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// Merlok, May 2011 +// Merlok, May 2011, 2012 // Many authors, whom made it possible // // This code is licensed to you under the terms of the GNU GPL, version 2 or, @@ -311,7 +311,7 @@ int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid) // Mifare HALT uint8_t* receivedAnswer = mifare_get_bigbufptr(); - len = mifare_sendcmd_short(pcs, 1, 0x50, 0x00, receivedAnswer); + len = mifare_sendcmd_short(pcs, pcs == NULL ? 0:1, 0x50, 0x00, receivedAnswer); if (len != 0) { if (MF_DBGLEVEL >= 1) Dbprintf("halt error. response len: %x", len); return 1;