Stop target listing when the maximal wanted target count is reached.
This commit is contained in:
parent
dfcb6f6cd3
commit
52354daa1e
1 changed files with 2 additions and 0 deletions
|
@ -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++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue