From a55a52e0a904da6eb35a050abd47fe61c0a7f5a1 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Sat, 5 Mar 2011 01:46:16 +0000 Subject: [PATCH] Fix pn53x_InAutoPoll() return value on user cancelation (true instead of false). --- libnfc/chips/pn53x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 2c10242..88096b1 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -675,9 +675,9 @@ pn53x_InAutoPoll (nfc_device_t * pnd, size_t szRx = sizeof(abtRx); bool res = pn53x_transceive (pnd, abtCmd, szTxInAutoPoll, abtRx, &szRx); - if ((szRx == 0) || (res == false)) { + if (res == false) { return false; - } else { + } else if (szRx > 0) { *pszTargetFound = abtRx[0]; if (*pszTargetFound) { uint8_t ln;