diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 5ae709a06..9ce5809f5 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -2757,11 +2757,6 @@ static int CmdHF14AMfUPwdGen(const char *Cmd) { if (selftest) return generator_selftest(); - if (u_len != 7) { - PrintAndLogEx(WARNING, "Key must be 7 hex bytes"); - return PM3_EINVARG; - } - if (use_tag) { // read uid from tag clearCommandBuffer(); @@ -2785,6 +2780,11 @@ static int CmdHF14AMfUPwdGen(const char *Cmd) { return PM3_ESOFT; } memcpy(uid, card.uid, sizeof(uid)); + } else { + if (u_len != 7) { + PrintAndLogEx(WARNING, "Key must be 7 hex bytes"); + return PM3_EINVARG; + } } PrintAndLogEx(INFO, "---------------------------------");