From 59fbf1e3544d9180f74b69a79abc5f314f4ba7fa Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 29 Oct 2017 20:07:45 +0100 Subject: [PATCH] chg: don't blindly trust other ppls changes --- client/cmdhf14a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index f391aa827..85ed8302a 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -726,19 +726,19 @@ static void waitCmd(uint8_t iSelect) { uint16_t len = 0; if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) { - uint8_t iLen = resp.arg[0]; + len = (resp.arg[0] & 0xFFFF); if (iSelect){ - iLen = resp.arg[1]; - if (iLen){ - PrintAndLog("Card selected. UID[%i]:", iLen); + len = (resp.arg[1] & 0xFFFF); + if (len){ + PrintAndLog("Card selected. UID[%i]:", len); } else { PrintAndLog("Can't select card."); } } else { - PrintAndLog("received %i bytes:", iLen); + PrintAndLog("received %i bytes:", len); } - if(!len) + if (!len) return; PrintAndLog("%s", sprint_hex(resp.d.asBytes, len) );