Skip to content

Commit

Permalink
Update MFRC522Extended.cpp
Browse files Browse the repository at this point in the history
Fixed warning : ordered comparison of pointer with integer zero preventing compilation on arduino-esp32 v3.x (issuehttps://github.com/miguelbalboa/issues/632 )
  • Loading branch information
alastaira committed Sep 12, 2024
1 parent d5dba13 commit 9004558
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MFRC522Extended.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
if (*backLen < in.inf.size)
return STATUS_NO_ROOM;

Expand All @@ -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) {
if ((*backLen + ackDataSize) > totalBackLen)
return STATUS_NO_ROOM;

Expand Down

0 comments on commit 9004558

Please sign in to comment.