From cd53f8a36fbdf9f4e2e1c3644b7c15c8883f9c7a Mon Sep 17 00:00:00 2001 From: Luziferus <8964310+FallenAngel666@users.noreply.github.com> Date: Tue, 1 Mar 2022 16:15:34 +0100 Subject: [PATCH] fix ISSUE-371: do not compare backLen > 0 Instead we just look if backLen is set. More infos here: https://github.com/miguelbalboa/rfid/issues/371 --- src/MFRC522Extended.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MFRC522Extended.cpp b/src/MFRC522Extended.cpp index da603ab7..02ef3db3 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) { 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) { if ((*backLen + ackDataSize) > totalBackLen) return STATUS_NO_ROOM;