// returns description of the best match
char* getTagInfo(uint8_t uid) {
- int i, best = -1;
+ int i;
int len = sizeof(manufactureMapping) / sizeof(manufactureName);
- for ( i = 0; i < len; ++i ) {
- if ( uid == manufactureMapping[i].uid) {
- if (best == -1) {
- best = i;
- }
- }
- }
+ for ( i = 0; i < len; ++i )
+ if ( uid == manufactureMapping[i].uid)
+ return manufactureMapping[i].desc;
- if (best>=0) return manufactureMapping[best].desc;
-
- return manufactureMapping[i].desc;
+ //No match, return default
+ return manufactureMapping[len-1].desc;
}
int CmdHF14AList(const char *Cmd)
PrintAndLog(" syntax: hf 14a sim <type> <uid>");
PrintAndLog(" types: 1 = MIFARE Classic");
PrintAndLog(" 2 = MIFARE Ultralight");
- PrintAndLog(" 3 = MIFARE DESFIRE");
+ PrintAndLog(" 3 = MIFARE Desfire");
PrintAndLog(" 4 = ISO/IEC 14443-4");
- PrintAndLog(" 5 = MIFARE TNP3XXX");
+ PrintAndLog(" 5 = MIFARE Tnp3xxx");
PrintAndLog("");
return 1;
}