Maybe fix handling of 7byte and 10byte uid cards
This commit is contained in:
parent
0f5a58fa50
commit
bad2fd2876
@ -42,8 +42,8 @@ card_t* rfid_find_card(const card_t *card)
|
|||||||
card_t *current;
|
card_t *current;
|
||||||
current = head;
|
current = head;
|
||||||
while (current != NULL) {
|
while (current != NULL) {
|
||||||
if ((current->uid_size != card->uid_size) ||
|
if (((current->uid_size == card->uid_size) &&
|
||||||
!memcmp(current->uid, card->uid, current->uid_size) ||
|
!memcmp(current->uid, card->uid, current->uid_size)) ||
|
||||||
((card->user != NULL) && !strcmp(current->user, card->user))) {
|
((card->user != NULL) && !strcmp(current->user, card->user))) {
|
||||||
|
|
||||||
return current;
|
return current;
|
||||||
|
Loading…
Reference in New Issue
Block a user