EM4x50 to exit if tear off

This commit is contained in:
iceman1001 2020-10-13 14:05:18 +02:00
parent d8b2dc2ebf
commit 9a3c669e59

View file

@ -393,6 +393,9 @@ int CmdEM4x50Write(const char *Cmd) {
return PM3_ETIMEOUT;
}
if (resp.status == PM3_ETEAROFF)
return PM3_SUCCESS;
bool isOK = (resp.status & STATUS_SUCCESS) >> 1;
if (isOK == false) {
PrintAndLogEx(FAILED, "writing " _RED_("failed"));
@ -487,6 +490,10 @@ int CmdEM4x50WritePassword(const char *Cmd) {
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
return PM3_ETIMEOUT;
}
if (resp.status == PM3_ETEAROFF)
return PM3_SUCCESS;
success = (bool)resp.status;
// get, prepare and print response