mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-11 10:03:49 +00:00
Fix a regression introduced at r458.
Both abtInit and szInitLen are initialised using pbtInitData and szInitDataLen, so we must use them when calling pn53x_InListPassiveTarget().
This commit is contained in:
@@ -465,7 +465,7 @@ nfc_initiator_select_passive_target(const nfc_device_t* pnd,
|
|||||||
size_t szTargetsData;
|
size_t szTargetsData;
|
||||||
byte_t abtTargetsData[MAX_FRAME_LEN];
|
byte_t abtTargetsData[MAX_FRAME_LEN];
|
||||||
|
|
||||||
if(!pn53x_InListPassiveTarget(pnd, nmInitModulation, 1, pbtInitData, szInitDataLen, abtTargetsData, &szTargetsData)) return false;
|
if(!pn53x_InListPassiveTarget(pnd, nmInitModulation, 1, abtInit, szInitLen, abtTargetsData, &szTargetsData)) return false;
|
||||||
|
|
||||||
// Make sure one tag has been found, the PN53X returns 0x00 if none was available
|
// Make sure one tag has been found, the PN53X returns 0x00 if none was available
|
||||||
if (abtTargetsData[0] == 0) return false;
|
if (abtTargetsData[0] == 0) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user