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:
Romain Tartiere 2010-07-24 16:30:44 +00:00
parent 544bda197e
commit 4ff66d125f

View file

@ -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;