From eeb20a5dea3a831a6aa3bf2e749710397c21ec36 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Tue, 27 Jul 2021 13:11:41 +0300 Subject: [PATCH] add check if isoid can be in the command --- client/src/mifare/desfirecore.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index 8003b3096..cd06f9939 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -1427,11 +1427,13 @@ void DesfirePrintCreateFileSettings(uint8_t filetype, uint8_t *data, size_t len) PrintAndLogEx(SUCCESS, "File type : %s", ftyperec->text); PrintAndLogEx(SUCCESS, "File number : 0x%02x (%d)", data[0], data[0]); size_t xlen = 1; - if (isoidpresent) { - PrintAndLogEx(SUCCESS, "File ISO number : 0x%04x", MemBeToUint2byte(&data[xlen])); - xlen += 2; - } else { - PrintAndLogEx(SUCCESS, "File ISO number : n/a"); + if (ftyperec->mayHaveISOfid) { + if (isoidpresent) { + PrintAndLogEx(SUCCESS, "File ISO number : 0x%04x", MemBeToUint2byte(&data[xlen])); + xlen += 2; + } else { + PrintAndLogEx(SUCCESS, "File ISO number : n/a"); + } } PrintAndLogEx(SUCCESS, "File comm mode : %s", GetDesfireCommunicationMode(data[xlen] & 0x03));