changed - now is able to interrupt search with <enter>

This commit is contained in:
iceman1001 2021-04-24 14:52:33 +02:00
commit 96ae77caf8

View file

@ -536,6 +536,12 @@ int EMVSearch(EMVCommandChannel channel, bool ActivateField, bool LeaveFieldON,
int res = 0;
int retrycnt = 0;
for (int i = 0; i < ARRAYLEN(AIDlist); i ++) {
if (kbd_enter_pressed()) {
PrintAndLogEx(INFO, "user aborted...");
break;
}
param_gethex_to_eol(AIDlist[i].aid, 0, aidbuf, sizeof(aidbuf), &aidlen);
res = EMVSelect(channel, (i == 0) ? ActivateField : false, true, aidbuf, aidlen, data, sizeof(data), &datalen, &sw, tlv);
// retry if error and not returned sw error