]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf14a.c
Fixed issue #43 on github
[proxmark3-svn] / client / cmdhf14a.c
index 53ab240c7da36b9e75f0453f71d22271f24f8784..01602d76a154414b8ad2e70365b49b37c7fa3247 100644 (file)
@@ -112,20 +112,15 @@ const manufactureName manufactureMapping[] = {
 // 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)
Impressum, Datenschutz