Skip to content

Commit 4ac9700

Browse files
robosphere99Rotzbua
authored andcommitted
Fix: Correct pointer comparison issue in MFRC522Extended.cpp
- Fixed an issue in `MFRC522Extended.cpp` where the code incorrectly compared a pointer (`backLen`) with an integer. - Modified the conditional statements at lines 824 and 847 to properly check if `backLen` is not null and its value is greater than zero. - This resolves compilation errors related to ordered comparison of pointers with integers in the MFRC522 library.
1 parent 87f59aa commit 4ac9700

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MFRC522Extended.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo *tag, byte *sendData
821821
// Swap block number on success
822822
tag->blockNumber = !tag->blockNumber;
823823

824-
if (backData && (backLen > 0)) {
824+
if (backData && (*backLen > 0)) {
825825
if (*backLen < in.inf.size)
826826
return STATUS_NO_ROOM;
827827

@@ -844,7 +844,7 @@ MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo *tag, byte *sendData
844844
if (result != STATUS_OK)
845845
return result;
846846

847-
if (backData && (backLen > 0)) {
847+
if (backData && (*backLen > 0)) {
848848
if ((*backLen + ackDataSize) > totalBackLen)
849849
return STATUS_NO_ROOM;
850850

0 commit comments

Comments
 (0)