From d939d025b005636bbb4f3d320632c79026603549 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Mon, 9 Aug 2021 15:44:13 +0300 Subject: [PATCH] fix --- client/src/cmdhfmfdes.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 4c53f2e50..6e7f80aa0 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -2335,24 +2335,14 @@ static int CmdHF14ADesSelectApp(const char *Cmd) { uint32_t isoid = 0x0000; bool isoidpresent = false; - if (CLIGetUint32Hex(ctx, 13, 0x0000, &isoid, &isoidpresent, 2, "ISO ID for EF or DF must have 2 bytes length")) { + if (CLIGetUint32Hex(ctx, 14, 0x0000, &isoid, &isoidpresent, 2, "ISO ID for EF or DF must have 2 bytes length")) { CLIParserFree(ctx); return PM3_EINVARG; } - res = arg_get_u32_hexstr_def_nlen(ctx, 14, 0x0000, &isoid, 2, true); - bool idsoidpresent = (res == 1); - if (res == 2) { - PrintAndLogEx(ERR, "ISO ID for EF or DF must have 2 bytes length"); - CLIParserFree(ctx); - return PM3_EINVARG; - } - uint32_t fileisoid = 0x0000; - res = arg_get_u32_hexstr_def_nlen(ctx, 15, 0x0000, &fileisoid, 2, true); - bool fileisoidpresent = (res == 1); - if (res == 2) { - PrintAndLogEx(ERR, "ISO ID for EF or DF must have 2 bytes length"); + bool fileisoidpresent = false; + if (CLIGetUint32Hex(ctx, 15, 0x0000, &fileisoid, &fileisoidpresent, 2, "ISO ID for EF or DF must have 2 bytes length")) { CLIParserFree(ctx); return PM3_EINVARG; }