Skip to content

Commit

Permalink
fix ISSUE-371: do not compare backLen > 0 miguelbalboa#580
Browse files Browse the repository at this point in the history
  • Loading branch information
tueddy committed Mar 4, 2024
1 parent 1e28cab commit caa3e6d
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) {
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) {
if ((*backLen + ackDataSize) > totalBackLen)
return STATUS_NO_ROOM;

Expand Down

0 comments on commit caa3e6d

Please sign in to comment.