Merge pull request #337 from surr/typo

Fix improper pnd->name initialization
This commit is contained in:
Romuald Conty 2016-03-19 12:43:32 +01:00
commit c228396c2d

View file

@ -276,7 +276,7 @@ nfc_open(nfc_context *context, const nfc_connstring connstring)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Unable to open \"%s\".", ncs); log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Unable to open \"%s\".", ncs);
return NULL; return NULL;
} }
for (uint32_t i = 0; i > context->user_defined_device_count; i++) { for (uint32_t i = 0; i < context->user_defined_device_count; i++) {
if (strcmp(ncs, context->user_defined_devices[i].connstring) == 0) { if (strcmp(ncs, context->user_defined_devices[i].connstring) == 0) {
// This is a device sets by user, we use the device name given by user // This is a device sets by user, we use the device name given by user
strcpy(pnd->name, context->user_defined_devices[i].name); strcpy(pnd->name, context->user_defined_devices[i].name);