chg: don't blindly trust other ppls changes
This commit is contained in:
@@ -726,19 +726,19 @@ static void waitCmd(uint8_t iSelect) {
|
|||||||
uint16_t len = 0;
|
uint16_t len = 0;
|
||||||
|
|
||||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||||
uint8_t iLen = resp.arg[0];
|
len = (resp.arg[0] & 0xFFFF);
|
||||||
if (iSelect){
|
if (iSelect){
|
||||||
iLen = resp.arg[1];
|
len = (resp.arg[1] & 0xFFFF);
|
||||||
if (iLen){
|
if (len){
|
||||||
PrintAndLog("Card selected. UID[%i]:", iLen);
|
PrintAndLog("Card selected. UID[%i]:", len);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLog("Can't select card.");
|
PrintAndLog("Can't select card.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PrintAndLog("received %i bytes:", iLen);
|
PrintAndLog("received %i bytes:", len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!len)
|
if (!len)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PrintAndLog("%s", sprint_hex(resp.d.asBytes, len) );
|
PrintAndLog("%s", sprint_hex(resp.d.asBytes, len) );
|
||||||
|
|||||||
Reference in New Issue
Block a user