From 7a9f79efa1936ad22e6c624dca23446a5e321474 Mon Sep 17 00:00:00 2001 From: Jacques Supcik Date: Mon, 3 Jun 2024 18:22:29 +0200 Subject: [PATCH] chore: Fix backLen comparison in MFRC522Extended.cpp The comparison of backLen in MFRC522Extended.cpp was incorrect. When compiled in ESP IDF, the compiler gave the error : "ordered comparison of pointer with integer zero" --- src/MFRC522Extended.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MFRC522Extended.cpp b/src/MFRC522Extended.cpp index da603ab7..57c815dc 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 != NULL)) { 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 != NULL)) { if ((*backLen + ackDataSize) > totalBackLen) return STATUS_NO_ROOM;