diff --git a/client/cmdhf15.c b/client/cmdhf15.c index 70058c04d..c6f4c207e 100644 --- a/client/cmdhf15.c +++ b/client/cmdhf15.c @@ -684,15 +684,15 @@ int CmdHF15Dump(const char *Cmd) { //Validations if (errors) return usage_15_dump(); + if (!getUID(uid)) { + PrintAndLogEx(WARNING, "No tag found."); + return 1; + } + if (fileNameLen < 1) { PrintAndLogEx(INFO, "Using UID as filename"); - if (!getUID(uid)) { - PrintAndLogEx(WARNING, "No tag found."); - return 1; - } - fptr += sprintf(fptr, "hf-15-"); FillFileNameByUID(fptr, uid, "-dump", sizeof(uid)); }