From 4ff66d125f07635c4f54acc006807e4b98d0afb5 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Sat, 24 Jul 2010 16:30:44 +0000 Subject: [PATCH] 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(). --- libnfc/nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 78284ab..7af985d 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -465,7 +465,7 @@ nfc_initiator_select_passive_target(const nfc_device_t* pnd, size_t szTargetsData; 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 if (abtTargetsData[0] == 0) return false;