From 0119049cbe363517e314b6547a8afc747323e89d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 26 Jan 2024 21:13:25 +0100 Subject: [PATCH] fix return value --- client/src/cmdhfxerox.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/cmdhfxerox.c b/client/src/cmdhfxerox.c index 59850fa14..8c87390ea 100644 --- a/client/src/cmdhfxerox.c +++ b/client/src/cmdhfxerox.c @@ -404,10 +404,12 @@ static int xerox_select_card(iso14b_card_select_t *card) { SendCommandNG(CMD_HF_ISO14443B_COMMAND, (uint8_t *)&packet, sizeof(iso14b_raw_cmd_t)); PacketResponseNG resp; if (WaitForResponseTimeout(CMD_HF_ISO14443B_COMMAND, &resp, TIMEOUT) == false) { - if (resp.status == PM3_SUCCESS) { - memcpy(card, (iso14b_card_select_t *)resp.data.asBytes, sizeof(iso14b_card_select_t)); - } - return resp.length; + continue; + } + + if (resp.status == PM3_SUCCESS) { + memcpy(card, (iso14b_card_select_t *)resp.data.asBytes, sizeof(iso14b_card_select_t)); + return resp.status; } } // retry