summaryrefslogtreecommitdiffstats
path: root/src/phHal4Nfc_ADD.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/phHal4Nfc_ADD.c')
-rwxr-xr-xsrc/phHal4Nfc_ADD.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/phHal4Nfc_ADD.c b/src/phHal4Nfc_ADD.c
index 54dd1c1..9461e43 100755
--- a/src/phHal4Nfc_ADD.c
+++ b/src/phHal4Nfc_ADD.c
@@ -671,12 +671,15 @@ void phHal4Nfc_TargetDiscoveryComplete(
if(phHal_eNfcIP1_Target ==
Hal4Ctxt->rem_dev_list[Count-1]->RemDevType)
{
- (void)memcpy(
- (void *)Hal4Ctxt->rem_dev_list[0],
- (void *)Hal4Ctxt->rem_dev_list[Count-1],
- sizeof(phHal_sRemoteDevInformation_t)
- );
- NfcIpDeviceCount = 1;
+ if (Count != 1)
+ {
+ (void)memcpy(
+ (void *)Hal4Ctxt->rem_dev_list[0],
+ (void *)Hal4Ctxt->rem_dev_list[Count-1],
+ sizeof(phHal_sRemoteDevInformation_t)
+ );
+ }
+ NfcIpDeviceCount = 1;
break;
}
}