X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/325f26e25dfd0315d080214bdcaf4d3239ff491c..9a6bc2feb4f750e13f365c050f80b42194a3b797:/armsrc/mifareutil.c diff --git a/armsrc/mifareutil.c b/armsrc/mifareutil.c index ca2cbeb7..a9e48781 100644 --- a/armsrc/mifareutil.c +++ b/armsrc/mifareutil.c @@ -471,7 +471,11 @@ int mifare_ultra_writeblock(uint8_t blockNo, uint8_t *blockData) { } int mifare_classic_halt_ex(struct Crypto1State *pcs) { uint8_t receivedAnswer[4] = {0x00, 0x00, 0x00, 0x00}; - mifare_sendcmd_short(pcs, (pcs == NULL) ? CRYPT_NONE : CRYPT_ALL, 0x50, 0x00, receivedAnswer, NULL, NULL); + uint16_t len = mifare_sendcmd_short(pcs, (pcs == NULL) ? CRYPT_NONE : CRYPT_ALL, 0x50, 0x00, receivedAnswer, NULL, NULL); + if (len != 0) { + if (MF_DBGLEVEL >= MF_DBG_EXTENDED) Dbprintf("halt warning. response len: %x", len); + return 1; + } return 0; } int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid) {