add check if isoid can be in the command

This commit is contained in:
merlokk 2021-07-27 13:11:41 +03:00
parent efa91d4b00
commit eeb20a5dea

View file

@ -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 type : %s", ftyperec->text);
PrintAndLogEx(SUCCESS, "File number : 0x%02x (%d)", data[0], data[0]); PrintAndLogEx(SUCCESS, "File number : 0x%02x (%d)", data[0], data[0]);
size_t xlen = 1; size_t xlen = 1;
if (isoidpresent) { if (ftyperec->mayHaveISOfid) {
PrintAndLogEx(SUCCESS, "File ISO number : 0x%04x", MemBeToUint2byte(&data[xlen])); if (isoidpresent) {
xlen += 2; PrintAndLogEx(SUCCESS, "File ISO number : 0x%04x", MemBeToUint2byte(&data[xlen]));
} else { xlen += 2;
PrintAndLogEx(SUCCESS, "File ISO number : n/a"); } else {
PrintAndLogEx(SUCCESS, "File ISO number : n/a");
}
} }
PrintAndLogEx(SUCCESS, "File comm mode : %s", GetDesfireCommunicationMode(data[xlen] & 0x03)); PrintAndLogEx(SUCCESS, "File comm mode : %s", GetDesfireCommunicationMode(data[xlen] & 0x03));