mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
fixed order of checking
This commit is contained in:
parent
0096672d38
commit
4aa8645a33
2 changed files with 16 additions and 12 deletions
|
@ -1232,13 +1232,14 @@ static int CmdHF15ELoad(const char *Cmd) {
|
|||
return res;
|
||||
}
|
||||
|
||||
if (bytes_read != sizeof(iso15_tag_t)) {
|
||||
PrintAndLogEx(FAILED, "Memory image is not matching tag structure.");
|
||||
if (bytes_read == 0) {
|
||||
PrintAndLogEx(FAILED, "Memory image empty.");
|
||||
free(tag);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
if (bytes_read == 0) {
|
||||
PrintAndLogEx(FAILED, "Memory image empty.");
|
||||
|
||||
if (bytes_read != sizeof(iso15_tag_t)) {
|
||||
PrintAndLogEx(FAILED, "Memory image is not matching tag structure.");
|
||||
free(tag);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
@ -2693,13 +2694,14 @@ static int CmdHF15Restore(const char *Cmd) {
|
|||
return res;
|
||||
}
|
||||
|
||||
if (bytes_read != sizeof(iso15_tag_t)) {
|
||||
PrintAndLogEx(FAILED, "Memory image is not matching tag structure.");
|
||||
if (bytes_read == 0) {
|
||||
PrintAndLogEx(FAILED, "Memory image empty.");
|
||||
free(tag);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
if (bytes_read == 0) {
|
||||
PrintAndLogEx(FAILED, "Memory image empty.");
|
||||
|
||||
if (bytes_read != sizeof(iso15_tag_t)) {
|
||||
PrintAndLogEx(FAILED, "Memory image is not matching tag structure.");
|
||||
free(tag);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
@ -3357,13 +3359,14 @@ static int CmdHF15View(const char *Cmd) {
|
|||
return res;
|
||||
}
|
||||
|
||||
if (bytes_read != sizeof(iso15_tag_t)) {
|
||||
PrintAndLogEx(FAILED, "Memory image is not matching tag structure.");
|
||||
if (bytes_read == 0) {
|
||||
PrintAndLogEx(FAILED, "Memory image empty.");
|
||||
free(tag);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
if (bytes_read == 0) {
|
||||
PrintAndLogEx(FAILED, "Memory image empty.");
|
||||
|
||||
if (bytes_read != sizeof(iso15_tag_t)) {
|
||||
PrintAndLogEx(FAILED, "Memory image is not matching tag structure.");
|
||||
free(tag);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue