From ff98bb047d3048c6b992add4da27986bfb7a407d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 3 Feb 2021 00:15:19 +0100 Subject: [PATCH] lf t55xx wipe - better handling of wrong length pwd --- client/src/cmdlft55xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/cmdlft55xx.c b/client/src/cmdlft55xx.c index 89204952d..54111f040 100644 --- a/client/src/cmdlft55xx.c +++ b/client/src/cmdlft55xx.c @@ -2895,9 +2895,10 @@ static int CmdT55xxWipe(const char *Cmd) { res = arg_get_u32_hexstr_def(ctx, 2, 0x51243648, &password); if (res) { usepwd = true; + } - if (usepwd && res == 2) - PrintAndLogEx(WARNING, "Password should be 4 bytes, using default pwd"); + if (res == 2) { + PrintAndLogEx(WARNING, "Password should be 4 bytes, using default pwd"); } bool Q5 = arg_get_lit(ctx, 3);