diff --git a/src/MFRC522Extended.cpp b/src/MFRC522Extended.cpp index da603ab..6bde8d2 100644 --- a/src/MFRC522Extended.cpp +++ b/src/MFRC522Extended.cpp @@ -821,7 +821,7 @@ MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo *tag, byte *sendData // Swap block number on success tag->blockNumber = !tag->blockNumber; - if (backData && (backLen > 0)) { + if (backData && (backLen != nullptr && *backLen > 0)) { if (*backLen < in.inf.size) return STATUS_NO_ROOM; @@ -844,7 +844,7 @@ MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo *tag, byte *sendData if (result != STATUS_OK) return result; - if (backData && (backLen > 0)) { + if (backData && (backLen != nullptr && *backLen > 0)) { if ((*backLen + ackDataSize) > totalBackLen) return STATUS_NO_ROOM;