chg: 'hf 15 restore' - fail message added

This commit is contained in:
iceman1001 2019-04-03 15:42:42 +02:00
parent 0383d7f052
commit c03e425550

View file

@ -876,11 +876,14 @@ int CmdHF15Restore(const char *Cmd) {
snprintf(tmpCmd, sizeof(tmpCmd), "%s u %u %s", newCmdPrefix, i, hex);
PrintAndLogEx(DEBUG, "Command to be sent| %s", tmpCmd);
for (tried = 0; tried < retries; tried++)
if (!(retval = CmdHF15Write(tmpCmd)))
for (tried = 0; tried < retries; tried++) {
if (!(retval = CmdHF15Write(tmpCmd))) {
break;
}
}
if (tried >= retries) {
fclose(f);
PrintAndLogEx(FAILED, "Restore failed. Too many retries.");
return retval;
}