mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 02:04:39 +08:00
mfc mad_print compare
This commit is contained in:
parent
a93e54374e
commit
242c276bfb
1 changed files with 8 additions and 4 deletions
|
@ -99,19 +99,23 @@ static int mad_print(json_t **xroot, char *mad, bool verbose, char *out) {
|
|||
PrintAndLogEx(ERR, "data [%d] is not an object\n", idx);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
const char *fmad = mad_json_get_str(data, "mad");
|
||||
if (strcmp(mad, fmad) == 0) {
|
||||
elm = data;
|
||||
break;
|
||||
}
|
||||
char lmad[strlen(mad)];
|
||||
|
||||
char lfmad[strlen(fmad) + 1];
|
||||
strcpy(lfmad, fmad);
|
||||
str_lower(lfmad);
|
||||
char lmad[strlen(mad) + 1];
|
||||
strcpy(lmad, mad);
|
||||
str_lower(lmad);
|
||||
if (strcmp(lmad, fmad) == 0) {
|
||||
if (strcmp(lmad, lfmad) == 0) {
|
||||
elm = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (elm == NULL)
|
||||
|
|
Loading…
Reference in a new issue