mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
fix search big loop
This commit is contained in:
parent
e8671e6c18
commit
2245673262
1 changed files with 6 additions and 2 deletions
|
@ -260,6 +260,10 @@ int EMVExchangeEx(bool ActivateField, bool LeaveFieldON, sAPDU apdu, bool Includ
|
||||||
if (APDULogging)
|
if (APDULogging)
|
||||||
PrintAndLogEx(NORMAL, "<<<< %s", sprint_hex(Result, *ResultLen));
|
PrintAndLogEx(NORMAL, "<<<< %s", sprint_hex(Result, *ResultLen));
|
||||||
|
|
||||||
|
if (*ResultLen < 2) {
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
*ResultLen -= 2;
|
*ResultLen -= 2;
|
||||||
isw = Result[*ResultLen] * 0x0100 + Result[*ResultLen + 1];
|
isw = Result[*ResultLen] * 0x0100 + Result[*ResultLen + 1];
|
||||||
if (sw)
|
if (sw)
|
||||||
|
@ -400,8 +404,8 @@ int EMVSearch(bool ActivateField, bool LeaveFieldON, bool decodeTLV, struct tlvd
|
||||||
if (++retrycnt < 3){
|
if (++retrycnt < 3){
|
||||||
i--;
|
i--;
|
||||||
} else {
|
} else {
|
||||||
// card select error, proxmark error
|
// (1) - card select error, proxmark error OR (200) - result length = 0
|
||||||
if (res == 1) {
|
if (res == 1 || res == 200) {
|
||||||
PrintAndLogEx(WARNING, "Exit...");
|
PrintAndLogEx(WARNING, "Exit...");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue