//-----------------------------------------------------------------------------\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
// 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