mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-17 13:03:48 +00:00
Stop target listing when the maximal wanted target count is reached.
This commit is contained in:
@@ -405,6 +405,8 @@ nfc_initiator_list_passive_targets (nfc_device_t * pnd, const nfc_modulation_t n
|
|||||||
|
|
||||||
if (szTargets > szTargetFound) {
|
if (szTargets > szTargetFound) {
|
||||||
memcpy (&(anti[szTargetFound]), &nti, sizeof (nfc_target_info_t));
|
memcpy (&(anti[szTargetFound]), &nti, sizeof (nfc_target_info_t));
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
szTargetFound++;
|
szTargetFound++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user